Actions
Bug #12130
closednfs/statd: cast between incompatible function types
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors with gcc 8:
sm_svc.c: In function 'sm_prog_1': sm_svc.c:230:12: error: cast between incompatible function types from 'void (*)(reg1args *, reg1res *)' {aka 'void (*)(struct reg1args *, struct reg1res *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) nsmaddrproc1_reg; ^ sm_svc.c:248:12: error: cast between incompatible function types from 'void (*)(sm_name *, sm_stat_res *)' {aka 'void (*)(struct sm_name *, struct sm_stat_res *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_stat_svc; ^ sm_svc.c:254:12: error: cast between incompatible function types from 'void (*)(mon *, sm_stat_res *)' {aka 'void (*)(struct mon *, struct sm_stat_res *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_mon_svc; ^ sm_svc.c:260:12: error: cast between incompatible function types from 'void (*)(mon_id *, sm_stat *)' {aka 'void (*)(struct mon_id *, struct sm_stat *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_unmon_svc; ^ sm_svc.c:266:12: error: cast between incompatible function types from 'void (*)(my_id *, sm_stat *)' {aka 'void (*)(struct my_id *, struct sm_stat *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_unmon_all_svc; ^ sm_svc.c:272:12: error: cast between incompatible function types from 'void (*)(void *)' to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_simu_crash_svc; ^ sm_svc.c:278:12: error: cast between incompatible function types from 'void (*)(stat_chge *)' {aka 'void (*)(struct stat_chge *)'} to 'char * (*)()' [-Werror=cast-function-type] local = (char *(*)()) sm_notify_svc; ^ sm_statd.c: In function 'statd_init': sm_statd.c:241:26: error: cast between incompatible function types from 'void * (*)(void)' to 'void * (*)(void *)' [-Werror=cast-function-type] if (thr_create(NULL, 0, (void *(*)(void *))thr_statd_init, NULL, ^ sm_statd.c: In function 'thr_statd_init': sm_statd.c:438:26: error: cast between incompatible function types from 'void * (*)(void)' to 'void * (*)(void *)' [-Werror=cast-function-type] if (thr_create(NULL, 0, (void *(*)(void *))sm_try, NULL, THR_DETACHED, ^ cc1: all warnings being treated as errors
Testing done: build/install/boot
I was running mailx -f mbox on NFSv3 mounted directory, then did reboot NFS server. after reboot the mailx did resume as expected and was able to acquire locks again: 192.168.150.40 -> 192.168.225.130 NLM R LOCK4 OH=0600 denied (grace period) 192.168.150.40 -> 192.168.225.130 NLM R LOCK4 OH=0600 denied (grace period) 192.168.225.130 -> 192.168.150.40 TCP D=4045 S=1010 Ack=3567439580 Seq=3227489823 Len=0 Win=64240 192.168.225.130 -> 192.168.150.40 NLM C Null4 192.168.150.40 -> 192.168.225.130 TCP D=1010 S=4045 Ack=3227489935 Seq=3567439580 Len=0 Win=64240 192.168.150.40 -> 192.168.225.130 NLM R Null4 192.168.225.130 -> 192.168.150.40 TCP D=4045 S=1010 Ack=3567439608 Seq=3227489935 Len=0 Win=64240 192.168.225.130 -> 192.168.150.40 NLM C LOCK4 OH=0600 FH=7B8F PID=7115 Region=0:0 (retransmit) 192.168.150.40 -> 192.168.225.130 TCP D=1010 S=4045 Ack=3227490143 Seq=3567439608 Len=0 Win=64240 192.168.150.40 -> 192.168.225.130 NLM R LOCK4 OH=0600 granted 192.168.225.130 -> 192.168.150.40 NFS C GETATTR3 FH=7B8F 192.168.150.40 -> 192.168.225.130 TCP D=1012 S=2049 Ack=3975456823 Seq=481305921 Len=0 Win=64240 192.168.150.40 -> 192.168.225.130 NLM R LOCK4 OH=0600 granted 192.168.150.40 -> 192.168.225.130 NFS R GETATTR3 OK .40 is server, .130 is client.
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 064d16273d15bf6b8ef164ed9d00a767e2fcd0ed
commit 064d16273d15bf6b8ef164ed9d00a767e2fcd0ed Author: Toomas Soome <tsoome@me.com> Date: 2020-01-04T11:47:53.000Z 12130 nfs/statd: cast between incompatible function types Reviewed by: C Fraire <cfraire@me.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
Actions