Open jimklimov opened 4 years ago
As of late, due to recipe changes the OpenBSD (6.4 amd64 generic) worker in Buildbot farm fails to built NUT (issue #1190), all other system pass the build.
Last green master-branch build still reports the sort of warnings this issue is about: http://buildbot.networkupstools.org/public/nut/builders/OpenBSD-x64/builds/1038/steps/compile/logs/warnings%20%2822%29
Recent builds succeed again, although still with many warnings, mostly about not using safer string length-limited operations, rand/random methods, and lately about many of the sanity-checks about data ranges that vary between platforms (to check: are those covered with macros for "tautologic" checks? does build toolkit on OpenBSD honor these, and/or does it need other warning names put into pragmas?):
../../clients/upsclient.c:647: warning: comparison is always true due to limited range of data type
../../clients/upsclient.c:731: warning: comparison is always true due to limited range of data type
../../clients/upsrw.c:163: warning: comparison is always true due to limited range of data type
../../clients/upscmd.c:238: warning: comparison is always true due to limited range of data type
../../drivers/bcmxcp_ser.c:338: warning: comparison is always true due to limited range of data type
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/microdowell.c:817: warning: comparison of unsigned expression < 0 is always false
../../drivers/microdowell.c:851: warning: comparison of unsigned expression < 0 is always false
../../drivers/libshut.c:1172: warning: comparison is always false due to limited range of data type
../../drivers/libshut.c:1173: warning: comparison is always false due to limited range of data type
../../drivers/libshut.c:1235: warning: comparison of unsigned expression < 0 is always false
../../drivers/libhid.c:570: warning: comparison is always false due to limited range of data type
../../drivers/hidparser.c:584: warning: comparison of unsigned expression < 0 is always false
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:659: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:660: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:660: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:661: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:709: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:710: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:710: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:711: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:759: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:760: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:760: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:761: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:799: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:800: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/usbhid-ups.c:1196: warning: comparison is always true due to limited range of data type
../../drivers/libusb1.c:659: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:660: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:660: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:661: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:709: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:710: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:710: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:711: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:759: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:760: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:760: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:761: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:799: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:800: warning: comparison is always false due to limited range of data type
../../drivers/hidparser.c:584: warning: comparison is always false due to limited range of data type
../../drivers/hidparser.c:585: warning: comparison is always false due to limited range of data type
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:123: warning: comparison is always false due to limited range of data type
../../drivers/richcomm_usb.c:151: warning: comparison is always false due to limited range of data type
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../server/netssl.c:650: warning: comparison is always true due to limited range of data type
../../server/netssl.c:683: warning: comparison is always true due to limited range of data type
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
hidparser.c:584: warning: comparison is always false due to limited range of data type
hidparser.c:585: warning: comparison is always false due to limited range of data type
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../drivers/belkinunv.c:739: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/gamatronic.c:73: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/masterguard.c:360: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/mge-utalk.c:629: warning: sprintf() is often misused, please use snprintf()
../../drivers/safenet.c:375: warning: random() may return deterministic values, is that what you want?
../../drivers/solis.c:711: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/upscode2.c:1246: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/apcsmart.c:687: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_qx_masterguard.c:330: warning: strcpy() is almost always misused, please use strlcpy()
../../drivers/snmp-ups.c:2052: warning: sprintf() is often misused, please use snprintf()
../../drivers/snmp-ups.c:2415: warning: strcat() is almost always misused, please use strlcat()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/bcmxcp_usb.c:444: warning: sprintf() is often misused, please use snprintf()
../../drivers/tripplite_usb.c:431: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/richcomm_usb.c:395: warning: sprintf() is often misused, please use snprintf()
../../drivers/libusb1.c:222: warning: sprintf() is often misused, please use snprintf()
../../drivers/nutdrv_atcl_usb.c:348: warning: sprintf() is often misused, please use snprintf()
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
../../server/upsd.c:947: warning: rand() may return deterministic values, is that what you want?
as of http://buildbot.networkupstools.org/public/nut/builders/OpenBSD-x64/builds/1205/steps/compile/logs/warnings%20%28169%29 (nut-v2.7.4-4613-ge121856932.7.4.1.tar.gz => https://github.com/networkupstools/nut/commit/e121856938781ed307587f2b6d5740db1cd19a22 master revision)
An OpenBSD-6.4 worker (clang-6.0.0, gcc-4.2.1) was deployed as a regular guest in the new NUT CI farm. CI recipes and configure
script warnings pre-sets were tweaked to cater for its (lack of) support for certain warnings and pragmas, effectively making warnings in builds by old gcc (4.3 or older) non-fatal by default.
The warnings/suggestions above seem to not come from compiler stack, and so do not show up in Jenkins Warnings analyzer summaries for the builds, but from the linker - it similarly notes some third-party library shared objects as using questionable methods.
http://buildbot.networkupstools.org/public/nut/builders/OpenBSD-x64/builds/802/steps/compile/logs/warnings%20%2812%29
Note for context: seems that for some string routines, NUT might use private implementations if the target systems lacks equivalents in their standard. I am not sure if those ARE used in that build, and if the compiler warning engine knows to differentiate the same-named functions.