usr.sbin/wpa/wpa_supplicant (WPA/802.11i Supplicant for wireless network devices) build time warning fixes
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Changelog:
Pre-fix warnings are at: https://gist.github.com/aprieger-llnw/3a1e9084e4dde2b7e6675ce071c92d21
- contrib/wpa/src/drivers/driver_ndis.c
- Warnings:
- warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
- warning: passing 'PTSTR' (aka 'char *') to parameter of type 'int8_t *' (aka 'signed char *') converts between pointers to integer types with different sign [-Wpointer-sign]
- warning: passing 'char [128]' to parameter of type 'int8_t *' (aka 'signed char *') converts between pointers to integer types with different sign [-Wpointer-sign]
- Fixes:
- changed the string format type from "%d" to "%lu" to handle the "unsigned long" variable instead of "int" on lines 507, 513, 576, 1539, 1573, 1595, 1786
- changed the string format type from "%d" to "%u" to handle the "unsigned int" variable instead of "int" on lines 513
- added the explicit modifier "int8_t*" to variables on lines 2142, 2148, 2764, 3067, 3073
- Warnings:
- contrib/wpa/src/drivers/Packet32.c
- Warnings:
- warning: passing 'int8_t *' (aka 'signed char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
- warning: assigning to 'char *' from 'int8_t *' (aka 'signed char *') converts between pointers to integer types with different sign [-Wpointer-sign]
- Fixes:
- added the explicit modifier "const char*" to variables on lines 128, 130, 136, 147
- added the explicit modifer "char *" to variable on line 247
- Warnings:
Comment Actions
For code in contrib/ we should really work with upstream on fixes - wpa_supplicant's upstream is https://w1.fi/wpa_supplicant/. It may be that they have a large set of compilers they need to support, and those might not support e.g. %z.
contrib/wpa/src/drivers/driver_ndis.c | ||
---|---|---|
507 | The z modifier should be used for size_t (so %zu here) |