#58 C compiler warnings/errors with `./run-tests.sh -t performance`
Opened 3 months ago by osalbahr. Modified 3 months ago

This was done as part of today's Test Week (preinstalled tests):

bash-5.2$ ./runtests.sh -t performance
No .config file found. You can cp config.example .config and edit as needed for easier log submission.
Test suite called with performance
lat_rpc.c:24:10: error: conflicting types for ‘client_rpc_xact_1’; have ‘char *(char *, CLIENT *)’ {aka ‘char *(char *, struct __rpc_client *)’}
   24 | char    *client_rpc_xact_1(char *argp, CLIENT *clnt);
      |          ^~~~~~~~~~~~~~~~~
In file included from lat_rpc.c:19:
bench.h:321:14: note: previous declaration of ‘client_rpc_xact_1’ with type ‘char *(void)’
  321 | extern char *client_rpc_xact_1();
      |              ^~~~~~~~~~~~~~~~~
lat_rpc.c: In function ‘main’:
lat_rpc.c:136:33: warning: implicit declaration of function ‘lmbench_usage’ [-Wimplicit-function-declaration]
  136 |                                 lmbench_usage(ac, av, usage);
      |                                 ^~~~~~~~~~~~~
lat_rpc.c: At top level:
lat_rpc.c:176:1: error: conflicting types for ‘client_rpc_xact_1’; have ‘char *(char *, CLIENT *)’ {aka ‘char *(char *, struct __rpc_client *)’}
  176 | client_rpc_xact_1(char *argp, CLIENT *clnt)
      | ^~~~~~~~~~~~~~~~~
bench.h:321:14: note: previous declaration of ‘client_rpc_xact_1’ with type ‘char *(void)’
  321 | extern char *client_rpc_xact_1();
      |              ^~~~~~~~~~~~~~~~~
lat_rpc.c: In function ‘rpc_xact_1’:
lat_rpc.c:193:1: warning: old-style function definition [-Wold-style-definition]
  193 | rpc_xact_1(msg, transp)
      | ^~~~~~~~~~
lat_rpc.c:196:1: error: number of arguments doesn’t match prototype
  196 | {
      | ^
bench.h:320:14: error: prototype declaration
  320 | extern char *rpc_xact_1();
      |              ^~~~~~~~~~
lat_rpc.c: In function ‘server_main’:
lat_rpc.c:218:57: warning: passing argument 4 of ‘svc_register’ from incompatible pointer type [-Wincompatible-pointer-types]
  218 |         if (!svc_register(transp, XACT_PROG, XACT_VERS, xact_prog_1, IPPROTO_UDP)) {
      |                                                         ^~~~~~~~~~~
      |                                                         |
      |                                                         void (*)(void)
In file included from /usr/include/tirpc/rpc/svc.h:463,
                 from /usr/include/tirpc/rpc/rpc.h:63,
                 from bench.h:38:
/usr/include/tirpc/rpc/svc_soc.h:70:21: note: expected ‘void (*)(struct svc_req *, SVCXPRT *)’ {aka ‘void (*)(struct svc_req *, struct __rpc_svcxprt *)’} but argument is of type ‘void (*)(void)’
   70 |                     void (*)(struct svc_req *, SVCXPRT *), int);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lat_rpc.c:202:13: note: ‘xact_prog_1’ declared here
  202 | static void xact_prog_1();
      |             ^~~~~~~~~~~
lat_rpc.c:228:57: warning: passing argument 4 of ‘svc_register’ from incompatible pointer type [-Wincompatible-pointer-types]
  228 |         if (!svc_register(transp, XACT_PROG, XACT_VERS, xact_prog_1, IPPROTO_TCP)) {
      |                                                         ^~~~~~~~~~~
      |                                                         |
      |                                                         void (*)(void)
/usr/include/tirpc/rpc/svc_soc.h:70:21: note: expected ‘void (*)(struct svc_req *, SVCXPRT *)’ {aka ‘void (*)(struct svc_req *, struct __rpc_svcxprt *)’} but argument is of type ‘void (*)(void)’
   70 |                     void (*)(struct svc_req *, SVCXPRT *), int);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lat_rpc.c:202:13: note: ‘xact_prog_1’ declared here
  202 | static void xact_prog_1();
      |             ^~~~~~~~~~~
lat_rpc.c: In function ‘xact_prog_1’:
lat_rpc.c:240:1: warning: old-style function definition [-Wold-style-definition]
  240 | xact_prog_1(rqstp, transp)
      | ^~~~~~~~~~~
lat_rpc.c:257:30: warning: assignment to ‘bool_t (*)(void)’ {aka ‘int (*)(void)’} from incompatible pointer type ‘bool_t (*)(XDR *, char *)’ {aka ‘int (*)(struct __rpc_xdr *, char *)’} [-Wincompatible-pointer-types]
  257 |                 xdr_argument = xdr_char;
      |                              ^
In file included from /usr/include/tirpc/rpc/rpc.h:43:
/usr/include/tirpc/rpc/xdr.h:316:17: note: ‘xdr_char’ declared here
  316 | extern bool_t   xdr_char(XDR *, char *);
      |                 ^~~~~~~~
lat_rpc.c:258:28: warning: assignment to ‘bool_t (*)(void)’ {aka ‘int (*)(void)’} from incompatible pointer type ‘bool_t (*)(XDR *, char *)’ {aka ‘int (*)(struct __rpc_xdr *, char *)’} [-Wincompatible-pointer-types]
  258 |                 xdr_result = xdr_char;
      |                            ^
/usr/include/tirpc/rpc/xdr.h:316:17: note: ‘xdr_char’ declared here
  316 | extern bool_t   xdr_char(XDR *, char *);
      |                 ^~~~~~~~
lat_rpc.c:276:19: error: too many arguments to function ‘local’; expected 0, have 2
  276 |         result = (*local)(&argument, rqstp);
      |                  ~^~~~~~~ ~~~~~~~~~
gmake[2]: *** [Makefile:397: ../bin/x86_64-linux-gnu/lat_rpc] Error 1
make[1]: *** [Makefile:114: lmbench] Error 2
make: *** [Makefile:20: build] Error 2
lat_rpc.c:24:10: error: conflicting types for ‘client_rpc_xact_1’; have ‘char *(char *, CLIENT *)’ {aka ‘char *(char *, struct __rpc_client *)’}
   24 | char    *client_rpc_xact_1(char *argp, CLIENT *clnt);
      |          ^~~~~~~~~~~~~~~~~
In file included from lat_rpc.c:19:
bench.h:321:14: note: previous declaration of ‘client_rpc_xact_1’ with type ‘char *(void)’
  321 | extern char *client_rpc_xact_1();
      |              ^~~~~~~~~~~~~~~~~
lat_rpc.c: In function ‘main’:
lat_rpc.c:136:33: warning: implicit declaration of function ‘lmbench_usage’ [-Wimplicit-function-declaration]
  136 |                                 lmbench_usage(ac, av, usage);
      |                                 ^~~~~~~~~~~~~
lat_rpc.c: At top level:
lat_rpc.c:176:1: error: conflicting types for ‘client_rpc_xact_1’; have ‘char *(char *, CLIENT *)’ {aka ‘char *(char *, struct __rpc_client *)’}
  176 | client_rpc_xact_1(char *argp, CLIENT *clnt)
      | ^~~~~~~~~~~~~~~~~
bench.h:321:14: note: previous declaration of ‘client_rpc_xact_1’ with type ‘char *(void)’
  321 | extern char *client_rpc_xact_1();
      |              ^~~~~~~~~~~~~~~~~
lat_rpc.c: In function ‘rpc_xact_1’:
lat_rpc.c:193:1: warning: old-style function definition [-Wold-style-definition]
  193 | rpc_xact_1(msg, transp)
      | ^~~~~~~~~~
lat_rpc.c:196:1: error: number of arguments doesn’t match prototype
  196 | {
      | ^
bench.h:320:14: error: prototype declaration
  320 | extern char *rpc_xact_1();
      |              ^~~~~~~~~~
lat_rpc.c: In function ‘server_main’:
lat_rpc.c:218:57: warning: passing argument 4 of ‘svc_register’ from incompatible pointer type [-Wincompatible-pointer-types]
  218 |         if (!svc_register(transp, XACT_PROG, XACT_VERS, xact_prog_1, IPPROTO_UDP)) {
      |                                                         ^~~~~~~~~~~
      |                                                         |
      |                                                         void (*)(void)
In file included from /usr/include/tirpc/rpc/svc.h:463,
                 from /usr/include/tirpc/rpc/rpc.h:63,
                 from bench.h:38:
/usr/include/tirpc/rpc/svc_soc.h:70:21: note: expected ‘void (*)(struct svc_req *, SVCXPRT *)’ {aka ‘void (*)(struct svc_req *, struct __rpc_svcxprt *)’} but argument is of type ‘void (*)(void)’
   70 |                     void (*)(struct svc_req *, SVCXPRT *), int);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lat_rpc.c:202:13: note: ‘xact_prog_1’ declared here
  202 | static void xact_prog_1();
      |             ^~~~~~~~~~~
lat_rpc.c:228:57: warning: passing argument 4 of ‘svc_register’ from incompatible pointer type [-Wincompatible-pointer-types]
  228 |         if (!svc_register(transp, XACT_PROG, XACT_VERS, xact_prog_1, IPPROTO_TCP)) {
      |                                                         ^~~~~~~~~~~
      |                                                         |
      |                                                         void (*)(void)
/usr/include/tirpc/rpc/svc_soc.h:70:21: note: expected ‘void (*)(struct svc_req *, SVCXPRT *)’ {aka ‘void (*)(struct svc_req *, struct __rpc_svcxprt *)’} but argument is of type ‘void (*)(void)’
   70 |                     void (*)(struct svc_req *, SVCXPRT *), int);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lat_rpc.c:202:13: note: ‘xact_prog_1’ declared here
  202 | static void xact_prog_1();
      |             ^~~~~~~~~~~
lat_rpc.c: In function ‘xact_prog_1’:
lat_rpc.c:240:1: warning: old-style function definition [-Wold-style-definition]
  240 | xact_prog_1(rqstp, transp)
      | ^~~~~~~~~~~
lat_rpc.c:257:30: warning: assignment to ‘bool_t (*)(void)’ {aka ‘int (*)(void)’} from incompatible pointer type ‘bool_t (*)(XDR *, char *)’ {aka ‘int (*)(struct __rpc_xdr *, char *)’} [-Wincompatible-pointer-types]
  257 |                 xdr_argument = xdr_char;
      |                              ^
In file included from /usr/include/tirpc/rpc/rpc.h:43:
/usr/include/tirpc/rpc/xdr.h:316:17: note: ‘xdr_char’ declared here
  316 | extern bool_t   xdr_char(XDR *, char *);
      |                 ^~~~~~~~
lat_rpc.c:258:28: warning: assignment to ‘bool_t (*)(void)’ {aka ‘int (*)(void)’} from incompatible pointer type ‘bool_t (*)(XDR *, char *)’ {aka ‘int (*)(struct __rpc_xdr *, char *)’} [-Wincompatible-pointer-types]
  258 |                 xdr_result = xdr_char;
      |                            ^
/usr/include/tirpc/rpc/xdr.h:316:17: note: ‘xdr_char’ declared here
  316 | extern bool_t   xdr_char(XDR *, char *);
      |                 ^~~~~~~~
lat_rpc.c:276:19: error: too many arguments to function ‘local’; expected 0, have 2
  276 |         result = (*local)(&argument, rqstp);
      |                  ~^~~~~~~ ~~~~~~~~~
gmake[2]: *** [Makefile:397: ../bin/x86_64-linux-gnu/lat_rpc] Error 1
make[1]: *** [Makefile:114: lmbench] Error 2
make: *** [Makefile:23: results] Error 2
/bin/sh: line 1: ../scripts/getlist: Permission denied
/bin/sh: line 1: ../scripts/getsummary: Permission denied
make: *** [Makefile:110: summary] Error 126
./performance/lmbench3                                           PASS    

Test suite complete                                              PASS    

Your log file is located at: /home/liveuser/kernel-tests/logs/kernel-test-1754846930.log.txt
Submit your results to: https://kerneltest.fedoraproject.org/
The following information is not submitted with your log;
it is for informational purposes only.
Checking for kernel signature:
The signer's common name is kernel-signer
Vulnerability status:
/sys/devices/system/cpu/vulnerabilities/gather_data_sampling:Mitigation: Microcode
/sys/devices/system/cpu/vulnerabilities/ghostwrite:Not affected
/sys/devices/system/cpu/vulnerabilities/indirect_target_selection:Not affected
/sys/devices/system/cpu/vulnerabilities/itlb_multihit:KVM: Mitigation: Split huge pages
/sys/devices/system/cpu/vulnerabilities/l1tf:Mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
/sys/devices/system/cpu/vulnerabilities/mds:Mitigation: Clear CPU buffers; SMT vulnerable
/sys/devices/system/cpu/vulnerabilities/meltdown:Mitigation: PTI
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data:Mitigation: Clear CPU buffers; SMT vulnerable
/sys/devices/system/cpu/vulnerabilities/old_microcode:Not affected
/sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling:Not affected
/sys/devices/system/cpu/vulnerabilities/retbleed:Mitigation: IBRS
/sys/devices/system/cpu/vulnerabilities/spec_rstack_overflow:Not affected
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass:Mitigation: Speculative Store Bypass disabled via prctl
/sys/devices/system/cpu/vulnerabilities/spectre_v1:Mitigation: usercopy/swapgs barriers and __user pointer sanitization
/sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: IBRS; IBPB: conditional; STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
/sys/devices/system/cpu/vulnerabilities/srbds:Mitigation: Microcode
/sys/devices/system/cpu/vulnerabilities/tsa:Not affected
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort:Mitigation: TSX disabled

I created a PR to resolve the errors. I might also resolve the warnings idk.

Log in to comment on this ticket.

Metadata