Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62289 closed defect (fixed)

dcfldd @1.3.4-1_1: error: implicit declaration of function 'bit_count' is invalid in C99

Reported by: wyuenho (Jimmy Yuen Ho Wong) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc: cooljeanius (Eric Gallager)
Port: dcfldd

Description

There's no prebuilt binary available for Big Sur, and during build, the following error occurs:

In file included from verify.c:34:
./util.h:44:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern pclose2(FILE *);
~~~~~~ ^
verify.c:181:36: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        replicate_pattern(pattern, ibuf, input_blocksize);
                                   ^~~~
./pattern.h:35:45: note: passing argument to parameter here
extern void replicate_pattern(char *, char *, size_t);
                                            ^
verify.c:195:25: warning: format specifies type 'unsigned long long' but the argument has type 'uintmax_t' (aka 'unsigned long') [-Wformat]
                        w_full, total_mb);
                        ^~~~~~
verify.c:210:43: warning: format specifies type 'unsigned long long' but the argument has type 'uintmax_t' (aka 'unsigned long') [-Wformat]
                        prcnt, probed_mb, w_full, total_mb, secstr);
                                          ^~~~~~
verify.c:226:40: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            replicate_pattern(pattern, ibuf, v_nread);
                                       ^~~~
./pattern.h:35:45: note: passing argument to parameter here
extern void replicate_pattern(char *, char *, size_t);
                                            ^
translate.c:160:10: error: implicit declaration of function 'bit_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if ((MX (C_ASCII | C_EBCDIC | C_IBM) > 1)
         ^
translate.c:159:16: note: expanded from macro 'MX'
#define MX(a) (bit_count (conversions_mask & (a)))
               ^
In file included from copy.c:34:
./util.h:44:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern pclose2(FILE *);
~~~~~~ ^
copy.c:56:37: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    int nwritten = outputlist_write(obuf, output_blocksize);
                                    ^~~~
./output.h:53:41: note: passing argument to parameter here
extern int outputlist_write(const char *, size_t);
                                        ^
1 error generated.
In file included from verify.c:28:
./dcfldd.h:162copy.c:214:36: warning: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        replicate_pattern(pattern, ibuf, input_blocksize);
                                   ^~~~
./pattern.h:35:45: note: passing argument to parameter here
extern void replicate_pattern(char *, char *, size_t);
                                            ^
copy.c:226:25: warning: format specifies type 'unsigned long long' but the argument has type 'uintmax_t' (aka 'unsigned long') [-Wformat]
                        w_full, total_mb);
                        ^~~~~~
:20: warning: inline function 'quit' is not defined [-Wundefined-inline]
extern inline void quit(int);copy.c:240:43: 
                   ^
warning: format specifies type 'unsigned long long' but the argument has type 'uintmax_t' (aka 'unsigned long') [-Wformat]
                        prcnt, probed_mb, w_full, total_mb, secstr);
                                          ^~~~~~
verify.c:178:9: note: used here
        quit(exit_status);
        ^
copy.c:306:45: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
            int nwritten = outputlist_write(obuf, n_bytes_read);
                                            ^~~~
./output.h:53:41: note: passing argument to parameter here
extern int outputlist_write(const char *, size_t);
                                        ^
copy.c:364:41: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        int nwritten = outputlist_write(obuf, oc);
                                        ^~~~
./output.h:53:41: note: passing argument to parameter here
extern int outputlist_write(const char *, size_t);
                                        ^
In file included from copy.c:23:
./dcfldd.h:162:20: warning: inline function 'quit' is not defined [-Wundefined-inline]
extern inline void quit(int);
                   ^
copy.c:61:9: note: used here
        quit(1);
        ^
In file included from dcfldd.c:63:
./util.h:44:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
extern pclose2(FILE *);
~~~~~~ ^
make[1]: *** [translate.o] Error 1
make[1]: *** Waiting for unfinished jobs....
dcfldd.c:687:9: error: implicit declaration of function 'init_hashlist' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        init_hashlist(&ihashlist, hashops[VERIFY_HASH].flag);
        ^
dcfldd.c:689:9: error: implicit declaration of function 'init_hashlist' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        init_hashlist(&ihashlist, hashflags);
        ^
1 warning and 2 errors generated.
make[1]: *** [dcfldd.o] Error 1
6 warnings generated.
8 warnings generated.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_dcfldd/dcfldd/work/dcfldd-1.3.4-1'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_dcfldd/dcfldd/work/dcfldd-1.3.4-1'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_dcfldd/dcfldd/work/dcfldd-1.3.4-1" && /usr/bin/make -j8 -w all 
Exit code: 2
Error: Failed to build dcfldd: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_dcfldd/dcfldd/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port dcfldd failed

Change History (4)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: bigsur catalina added
Summary: dcffdd @1.3.4-1_1: broken on Big Surdcffdd @1.3.4-1_1: error: implicit declaration of function 'bit_count' is invalid in C99

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: dcffdd @1.3.4-1_1: error: implicit declaration of function 'bit_count' is invalid in C99dcfldd @1.3.4-1_1: error: implicit declaration of function 'bit_count' is invalid in C99

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In cc9e9c45247d7b8df6cdc24551fc90998c42bf5d/macports-ports (master):

dcfldd: Fix implicit declaration of functions

Closes: #62289

Also indicate license and modernize checksums.

comment:4 Changed 4 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.