GNOME Bugzilla – Bug 709410
A missing break in hanoi.c
Last modified: 2013-10-04 16:44:51 UTC
Hello, Cppcheck (a C++ static analyzer) reported this on gcompris sources "git updated" today: [src/hanoi-activity/hanoi.c:248] -> [src/hanoi-activity/hanoi.c:251]: (warning) Variable 'number_of_item_x' is reassigned a value before the old one has been used. 'break;' missing? [src/hanoi-activity/hanoi.c:249] -> [src/hanoi-activity/hanoi.c:252]: (warning) Variable 'number_of_item_y' is reassigned a value before the old one has been used. 'break;' missing? Indeed we have: 247 case 3: 248 number_of_item_x = 5; 249 number_of_item_y = 6; 250 case 4: 251 number_of_item_x = 6; 252 number_of_item_y = 7; 253 break; So there's just a missing break to add after line 249. Julien
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.