Skip to contentSkip to conversation

multipath-tools: multipathd/main.c: cannot jump from this goto statement to its label

BUG Xose Vazquez Perez 2 participants 4 messages Jun 29, 2016 – Jul 7, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

spotted by clang-3.8.0:

make[1]: Entering directory '/home/xose/tmp/arrays/multipath-tools.x1/multipathd'
clang -O2 -g -pipe -Wformat-security -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmultipath -I../libmpathpersist -I../libmpathcmd -DUSE_SYSTEMD=229 -c -o main.o main.c
main.c:586:3: error: cannot jump from this goto statement to its label
goto out_unlock;
^
main.c:631:38: note: jump bypasses initialization of variable with __attribute__((cleanup))

 do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (cleanup_lock), .__cancel_arg = (&vecs->lock), .__do_it = 1 };;
                                     ^

1 error generated.

#1 lore raw

multipath-tools: clang warnings(30)

spotted by clang-3.8.0:

28 warnings: array index X is past the end of the array (which contains Y element) [-Warray-bounds]
1 warning: address of array 'mpp->wwid' will always evaluate to 'true' [-Wpointer-bool-conversion]
1 warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion

clang output(81k): https://drive.google.com/file/d/0B_B6YmEmO7cDeEF1bXRVRHhFbDQ

#2 lore raw
In reply to Xose Vazquez Perez
Quoted 9 lines · Xose Vazquez Perez

spotted by clang-3.8.0:

make[1]: Entering directory '/home/xose/tmp/arrays/multipath-tools.x1/multipathd'
clang -O2 -g -pipe -Wformat-security -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmultipath -I../libmpathpersist -I../libmpathcmd -DUSE_SYSTEMD=229 -c -o main.o main.c
main.c:586:3: error: cannot jump from this goto statement to its label
goto out_unlock;
^
main.c:631:38: note: jump bypasses initialization of variable with __attribute__((cleanup))

Quoted 4 lines
 do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (cleanup_lock), .__cancel_arg = (&vecs->lock), .__do_it = 1 };;
                                     ^

1 error generated.

Hannes, could you please check this error?
The code was added in 97846ae8.

Thank you.

#3 lore raw
Quoted 16 lines · Xose Vazquez Perez
Quoted 9 lines · Xose Vazquez Perez

spotted by clang-3.8.0:

make[1]: Entering directory '/home/xose/tmp/arrays/multipath-tools.x1/multipathd'
clang -O2 -g -pipe -Wformat-security -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmultipath -I../libmpathpersist -I../libmpathcmd -DUSE_SYSTEMD=229 -c -o main.o main.c
main.c:586:3: error: cannot jump from this goto statement to its label
goto out_unlock;
^
main.c:631:38: note: jump bypasses initialization of variable with __attribute__((cleanup))

Quoted 4 lines
 do { struct __pthread_cleanup_frame __clframe __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) = { .__cancel_routine = (cleanup_lock), .__cancel_arg = (&vecs->lock), .__do_it = 1 };;
                                     ^

1 error generated.

Quoted 3 lines

Hannes, could you please check this error?
The code was added in 97846ae8.

The mentioned commit was reverted with my pending patchset for using user-space RCU for config accesses.
As (I think) it's about to be merged we just have to wait for Christophe to pick up the patchset.

Cheers,

Hannes

Signature · 10 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel