Opened 3 years ago

Last modified 5 months ago

#63332 new defect

scotty @3.0.0_9: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)'

Reported by: cooljeanius (Eric Gallager) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: bigsur catalina Cc:
Port: scotty

Description

Another victim of -Werror=implicit-function-declaration being on by default now:

/usr/bin/clang -c -pipe -Os -DBIND_8_COMPAT -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64  -fno-common   -I. -I./../tnm/generic -I/opt/local/include -I/opt/local/include/tcl8.6 mount_clnt.c
mount_clnt.c:18:2: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
        memset((char *)&clnt_res, 0, sizeof(clnt_res));
        ^
mount_clnt.c:18:2: note: include the header <string.h> or explicitly provide a declaration for 'memset'
mount_clnt.c:19:38: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                            ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:19:54: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_NULL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                            ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:32:37: warning: incompatible function pointer types passing 'int (XDR *, dirpath *)' (aka 'int (struct __rpc_xdr *, char **)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_MNT, xdr_dirpath, argp, xdr_fhstatus, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                           ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:32:56: warning: incompatible function pointer types passing 'int (XDR *, fhstatus *)' (aka 'int (struct __rpc_xdr *, struct fhstatus *)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_MNT, xdr_dirpath, argp, xdr_fhstatus, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                              ^~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:45:38: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_DUMP, xdr_void, argp, xdr_mountlist, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                            ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:45:54: warning: incompatible function pointer types passing 'int (XDR *, mountlist *)' (aka 'int (struct __rpc_xdr *, struct mountbody **)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_DUMP, xdr_void, argp, xdr_mountlist, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                            ^~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:58:38: warning: incompatible function pointer types passing 'int (XDR *, dirpath *)' (aka 'int (struct __rpc_xdr *, char **)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_UMNT, xdr_dirpath, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                            ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:58:57: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_UMNT, xdr_dirpath, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                               ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:71:41: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_UMNTALL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                               ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:71:57: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_UMNTALL, xdr_void, argp, xdr_void, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                               ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:84:40: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_EXPORT, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                              ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:84:56: warning: incompatible function pointer types passing 'int (XDR *, exports *)' (aka 'int (struct __rpc_xdr *, struct exportnode **)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_EXPORT, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                              ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
mount_clnt.c:97:43: warning: incompatible function pointer types passing 'int (void)' to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_EXPORTALL, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                 ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:38: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                            ^~~~~
mount_clnt.c:97:59: warning: incompatible function pointer types passing 'int (XDR *, exports *)' (aka 'int (struct __rpc_xdr *, struct exportnode **)') to parameter of type 'xdrproc_t' (aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)') [-Wincompatible-function-pointer-types]
        if (clnt_call(clnt, MOUNTPROC_EXPORTALL, xdr_void, argp, xdr_exports, &clnt_res, TIMEOUT) != RPC_SUCCESS)
                                                                 ^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/rpc/clnt.h:197:52: note: expanded from macro 'clnt_call'
        ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs))
                                                          ^~~~
14 warnings and 1 error generated.
make: *** [mount_clnt.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_scotty/scotty/work/scotty/trunk/unix'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_scotty/scotty/work/scotty/trunk/unix" && /usr/bin/make -j1 -w all 
Exit code: 2
Error: Failed to build scotty: command execution failed
DEBUG: Error code: CHILDSTATUS 8033 2

Change History (3)

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

scotty appears to be very old software (I think this version 3.0.0 is from 2001) but a newer maintained fork of scotty is at https://github.com/flightaware/scotty. Perhaps we should switch to that and perhaps they have already corrected this issue.

comment:2 in reply to:  1 Changed 21 months ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

scotty appears to be very old software (I think this version 3.0.0 is from 2001) but a newer maintained fork of scotty is at https://github.com/flightaware/scotty. Perhaps we should switch to that and perhaps they have already corrected this issue.

OK I tried the GitHub version and it has the same error; I reported it here: https://github.com/flightaware/scotty/issues/13

comment:3 Changed 5 months ago by cooljeanius (Eric Gallager)

Note that I've also forked the scotty repository: https://github.com/cooljeanius/scotty

I've submitted a PR to merge my changes back to upstream, but they seem to be inactive: https://github.com/flightaware/scotty/pull/14

Note: See TracTickets for help on using tickets.