Warnings for 5.4 kernel, note: [-Wvla]
Reading 0/204 dependency files
Done reading dependencies
Reading 0/204 dependency files
Done reading dependencies
In file included from hal/utils/halcmd_commands.cc:40:
hal/utils/halcmd_commands.cc: In function ‘int do_loadrt_cmd(char*, char**)’:
./config.h:49:24: warning: ISO C++ forbids converting a string constant to
‘char*’ [-Wwrite-strings]
49 | #define EMC2_RTLIB_DIR "/home/ntu/linuxcnc/rtlib"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
hal/utils/halcmd_commands.cc:1110:30: note: in expansion of macro
‘EMC2_RTLIB_DIR’
1110 | static char *rtmod_dir = EMC2_RTLIB_DIR;
| ^~~~~~~~~~~~~~
hal/utils/halcmd_commands.cc:1130:22: warning: comparison of integer
expressions of different signedness: ‘int’ and ‘long unsigned int’
[-Wsign-compare]
1130 | } else if (r >= sizeof(mod_path)) {
| ~~^~~~~~~~~~~~~~~~~~~
emc/usr_intf/emclcd.cc: In function ‘int main(int, char**)’:
emc/usr_intf/emclcd.cc:494:52: warning: ‘%s’ directive output may be truncated
writing up to 3679 bytes into a region of size 1013 [-Wformat-truncation=]
494 | snprintf(sockStr, sizeof(sockStr), "widget_add %s %s %s\n",
widgets[i].screenName,
| ^~
In file included from /usr/include/stdio.h:867,
from emc/usr_intf/emclcd.cc:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note:
‘__builtin___snprintf_chk’ output 15 or more bytes (assuming 3694) into a
destination of size 1024
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hal/components/carousel.comp: In function ‘_’:
hal/components/carousel.comp:329:15: warning: this statement may fall through
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:330:5: note: here
hal/components/carousel.comp:367:15: warning: this statement may fall through
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:368:5: note: here
hal/components/carousel.comp:440:15: warning: this statement may fall through
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:441:5: note: here
hal/components/mesa_pktgyro_test.comp: In function ‘receive’:
hal/components/mesa_pktgyro_test.comp:74:2: warning: ISO C90 forbids variable
length array ‘Replyd3’ [-Wvla]
hal/components/mesa_pktgyro_test.comp: In function ‘extra_setup’:
hal/components/mesa_pktgyro_test.comp:177:2: warning: ISO C90 forbids variable
length array ‘read1’ [-Wvla]
hal/components/mesa_pktgyro_test.comp:178:2: warning: ISO C90 forbids variable
length array ‘read1_sizes’ [-Wvla]
In file included from /home/ntu/linuxcnc/src/rtapi/rtai_rtapi.c:76:
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h: In function ‘rtapi_vsnprintf’:
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h:426:12: warning: this statement
may fall through [-Wimplicit-fallthrough=]
426 | flags |= LARGE;
| ^
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h:427:2: note: here
427 | case 'x':
| ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c: In function ‘write_one’:
/home/ntu/linuxcnc/src/hal/components/lcd.c:349:35: warning: this statement may
fall through [-Wimplicit-fallthrough=]
349 | inst->buff[1] = 0;
| ~~~~~~~~~~~~~~^~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:351:17: note: here
351 | default: //check for hex
| ^~~~~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:373:16: warning: this statement may
fall through [-Wimplicit-fallthrough=]
373 | if (retval >= 0) {
| ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:379:9: note: here
379 | default:
| ^~~~~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c: In function ‘parse_fmt’:
/home/ntu/linuxcnc/src/hal/components/lcd.c:426:20: warning: this statement may
fall through [-Wimplicit-fallthrough=]
426 | if (c < 0 && d == 0){
| ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:430:13: note: here
430 | case '1':
| ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:465:22: warning: this statement may
fall through [-Wimplicit-fallthrough=]
465 | base = 16;
| ~~~~~^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:466:13: note: here
466 | case 'o':
| ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:467:20: warning: this statement may
fall through [-Wimplicit-fallthrough=]
467 | if (base == 10) base = 8;
| ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:468:13: note: here
468 | case 'u':
| ^~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/abs_encoder.c: In function
‘hm2_absenc_register_tram’:
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/abs_encoder.c:90:15: warning:
this statement may fall through [-Wimplicit-fallthrough=]
90 | r += hm2_register_tram_read_region(hm2, chan->rw_addr[2],
| ^~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/abs_encoder.c:94:9: note: here
94 | case HM2_GTAG_SSI:
| ^~~~
In file included from
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:29:
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c: In function
‘hm2_sserial_update_params’:
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/hostmot2.h:53:34: warning:
this statement may fall through [-Wimplicit-fallthrough=]
53 | #define HM2_ERR(fmt, args...) rtapi_print_msg(RTAPI_MSG_ERR,
HM2_NAME "/%s: " fmt, hm2->llio->name, ## args)
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1531:33: note: in
expansion of macro ‘HM2_ERR’
1531 | HM2_ERR("Non IEEE float type parameter
of length %i\n", g->DataLength);
| ^~~~~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1532:33: note: here
1532 | case 8:
| ^~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1492:27: warning:
this statement may fall through [-Wimplicit-fallthrough=]
1492 | *inst->state2 = 1;
| ~~~~~~~~~~~~~~^~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1493:9: note: here
1493 | case 1:
| ^~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c: In function
‘hm2_sserial_read_pins’:
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1978:22: warning:
this statement may fall through [-Wimplicit-fallthrough=]
1978 | buff = buff_store;
| ~~~~~^~~~~~~~~~~~
/home/ntu/linuxcnc/src/hal/drivers/mesa-hostmot2/sserial.c:1980:13: note: here
1980 | case LBP_ENCODER:
| ^~~~
/home/ntu/linuxcnc/src/emc/motion/command.c: In function ‘is_feed_type’:
/home/ntu/linuxcnc/src/emc/motion/command.c:369:9: warning: this statement may
fall through [-Wimplicit-fallthrough=]
369 | rtapi_print_msg(RTAPI_MSG_ERR, "Internal error: unhandled
motion type %d\n", motion_type);
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ntu/linuxcnc/src/emc/motion/command.c:370:5: note: here
370 | case EMC_MOTION_TYPE_TOOLCHANGE:
| ^~~~
In file included from /home/ntu/linuxcnc/src/emc/motion/stashf.c:123:
/home/ntu/linuxcnc/src/emc/motion/stashf_wrap.h: In function ‘snprintdbuf’:
/home/ntu/linuxcnc/src/emc/motion/stashf_wrap.h:34:9: warning: ISO C90 forbids
variable length array ‘block’ [-Wvla]
34 | char block[fmt_len + 1];
| ^~~~
/home/ntu/linuxcnc/src/emc/motion/homing.c: In function ‘do_homing_sequence’:
/home/ntu/linuxcnc/src/emc/motion/homing.c:352:25: warning: this statement may
fall through [-Wimplicit-fallthrough=]
352 | sequence_is_set = 1;
| ~~~~~~~~~~~~~~~~^~~
/home/ntu/linuxcnc/src/emc/motion/homing.c:355:5: note: here
355 | case HOME_SEQUENCE_DO_ONE_SEQUENCE:
| ^~~~
/home/ntu/linuxcnc/src/emc/motion/homing.c:380:24: warning: this statement may
fall through [-Wimplicit-fallthrough=]
380 | sequence_state = HOME_SEQUENCE_START;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/ntu/linuxcnc/src/emc/motion/homing.c:384:5: note: here
384 | case HOME_SEQUENCE_START:
| ^~~~
/home/ntu/linuxcnc/src/emc/motion/homing.c:432:23: warning: this statement may
fall through [-Wimplicit-fallthrough=]
432 | homing_active = 1;
| ~~~~~~~~~~~~~~^~~
/home/ntu/linuxcnc/src/emc/motion/homing.c:435:5: note: here
435 | case HOME_SEQUENCE_START_JOINTS:
| ^~~~
/home/ntu/linuxcnc/src/emc/tp/tc.c: In function ‘tcGetMaxTargetVel’:
/home/ntu/linuxcnc/src/emc/tp/tc.c:43:23: warning: this statement may fall
through [-Wimplicit-fallthrough=]
43 | max_scale = 1.0;
| ~~~~~~~~~~^~~~~
/home/ntu/linuxcnc/src/emc/tp/tc.c:44:9: note: here
44 | case TC_SYNC_POSITION:
| ^~~~
/home/ntu/linuxcnc/src/emc/tp/tp.c: In function ‘tpUpdateRigidTapState’:
/home/ntu/linuxcnc/src/emc/tp/tp.c:2526:39: warning: this statement may fall
through [-Wimplicit-fallthrough=]
2526 | tc->coords.rigidtap.state = TAPPING;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/ntu/linuxcnc/src/emc/tp/tp.c:2528:9: note: here
2528 | case TAPPING:
| ^~~~
I will post Debian packages for the 5.4 RTAI kernel once it's ready, but it may
be a few weeks of testing. I need to fool proof Kconfig as well. I'll be using
the latest Debian Bullseye 5.10 kernel config as the baseline, and just let
Kconfig handle the differences once mine are plugged in. Latest config file is
config-5.10.0-19-amd64.
Just posting the warnings now so the developers have time to sort out the VLAs.
Variable length arrays are not accepted in kernel code and I'm not sure what
the side effects are. The RTAI codebase itself has two VLAs as well.
In the mean time, can you guys push the migration of SUBDIRS=`pwd` to M=`pwd` ?
Alec
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers