Closed kYc0o closed 5 years ago
I'd say all test should be OK right now, but let me check again in case something is missing.
I've found some more. I'll post it here so we still keep track of the current errors, even if they're not critical for the release.
[ ] driver_ata8520e non portable printf arguments
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_ata8520e/main.c:84:70: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
"message length is %d", SIGFOX_MAX_TX_LENGTH, strlen(argv[2]));
~~ ^~~~~~~~~~~~~~~
%lu
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_ata8520e/main.c:103:66: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
"message length is %d", SIGFOX_MAX_TX_LENGTH, strlen(argv[2]));
~~ ^~~~~~~~~~~~~~~
%lu
2 errors generated.
[ ] driver_hd44780 conficting types
/Users/facosta/git/RIOT-OS/RIOT/drivers/hd44780/hd44780.c:71:13: error: conflicting types for '_send'
static void _send(const hd44780_t *dev, uint8_t value, hd44780_state_t state)
^
/Users/facosta/git/RIOT-OS/RIOT/drivers/hd44780/hd44780.c:35:13: note: previous declaration is here
static void _send(const hd44780_t *dev, uint8_t value, uint8_t mode);
^
1 error generated.
[ ] driver_hih6130 various integer errors
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_hih6130/main.c:74:42: error: using integer absolute value function 'abs' when argument is of
floating point type [-Werror,-Wabsolute-value]
(int)integral, (unsigned int)abs(fractional * 10000.f));
^
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_hih6130/main.c:74:42: note: use function 'fabsf' instead
(int)integral, (unsigned int)abs(fractional * 10000.f));
^~~
fabsf
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_hih6130/main.c:77:42: error: using integer absolute value function 'abs' when argument is of
floating point type [-Werror,-Wabsolute-value]
(int)integral, (unsigned int)abs(fractional * 10000.f));
[ ] driver_lis3mdl implicit conversions
/Users/facosta/git/RIOT-OS/RIOT/drivers/lis3mdl/include/lis3mdl_params.h:75:5: error: implicit conversion from enumeration type
'lis3mdl_odr_t' to different enumeration type 'lis3mdl_scale_t' [-Werror,-Wenum-conversion]
LIS3MDL_PARAMS
^~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/drivers/lis3mdl/include/lis3mdl_params.h:62:51: note: expanded from macro 'LIS3MDL_PARAMS'
.scale = LIS3MDL_PARAM_ODR, \
^~~~~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/drivers/lis3mdl/include/lis3mdl_params.h:47:38: note: expanded from macro 'LIS3MDL_PARAM_ODR'
#define LIS3MDL_PARAM_ODR (LIS3MDL_ODR_10Hz)
^~~~~~~~~~~~~~~~
1 error generated.
[ ] driver_lsm6dsl binary literals usage I thought we reached a consensus on the usage of those isn't it?
/Users/facosta/git/RIOT-OS/RIOT/drivers/lsm6dsl/lsm6dsl.c:72:16: error: binary integer literals are a GNU extension
[-Werror,-Wgnu-binary-literal]
if (tmp != LSM6DSL_WHO_AM_I) {
^
/Users/facosta/git/RIOT-OS/RIOT/drivers/lsm6dsl/include/lsm6dsl_internal.h:132:46: note: expanded from macro 'LSM6DSL_WHO_AM_I'
#define LSM6DSL_WHO_AM_I (0b01101010)
^
1 error generated.
[ ] driver_mpu9150 missing newline
/Users/facosta/git/RIOT-OS/RIOT/drivers/mpu9150/include/mpu9150_params.h:79:10: error: no newline at end of file [-Werror,-Wnewline-eof]
/** @} */
^
1 error generated.
[ ] driver_pn532 C11 extensions
/Users/facosta/git/RIOT-OS/RIOT/drivers/include/pn532.h:43:5: error: anonymous unions are a C11 extension [-Werror,-Wc11-extensions]
union {
^
In file included from /Users/facosta/git/RIOT-OS/RIOT/drivers/pn532/pn532.c:26:
/Users/facosta/git/RIOT-OS/RIOT/drivers/include/pn532.h:43:5: error: anonymous unions are a C11 extension [-Werror,-Wc11-extensions]
union {
^
1 error generated.
[ ] driver_sdcard_spi non portable printf
/Users/facosta/git/RIOT-OS/RIOT/drivers/sdcard_spi/sdcard_spi.c:429:82: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
DEBUG("sdcard_spi_send_cmd: CMD%02d (0x%08lx) (retry %d)\n", sd_cmd_idx, argument, try_cnt);
~~~~~ ^~~~~~~~
%08x
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:97:50: note: expanded from macro 'DEBUG'
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:56:20: note: expanded from macro 'DEBUG_PRINT'
printf(__VA_ARGS__); \
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/drivers/sdcard_spi/sdcard_spi.c:478:82: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
DEBUG("sdcard_spi_send_acmd: CMD%02d (0x%08lx)(retry %d)\n", sd_cmd_idx, argument, err_cnt);
~~~~~ ^~~~~~~~
%08x
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:97:50: note: expanded from macro 'DEBUG'
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:56:20: note: expanded from macro 'DEBUG_PRINT'
printf(__VA_ARGS__); \
^~~~~~~~~~~
make[2]: *** [/Users/facosta/git/RIOT-OS/RIOT/Makefile.base:20: ALL--/Users/facosta/git/RIOT-OS/RIOT/drivers/periph_common] Error 2
make[2]: *** Waiting for unfinished jobs....
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:72:26: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf("PSN: %lu\n", card->cid.PSN);
~~~ ^~~~~~~~~~~~~
%u
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:195:55: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf(" bytes (%lu,%03lu GiB | %lu,%03lu GB)\n", gib_int, gib_frac, gb_int, gb_frac);
~~~ ^~~~~~~
%u
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:195:64: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf(" bytes (%lu,%03lu GiB | %lu,%03lu GB)\n", gib_int, gib_frac, gb_int, gb_frac);
~~~~~ ^~~~~~~~
%03u
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:195:74: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf(" bytes (%lu,%03lu GiB | %lu,%03lu GB)\n", gib_int, gib_frac, gb_int, gb_frac);
~~~ ^~~~~~
%u
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:195:82: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf(" bytes (%lu,%03lu GiB | %lu,%03lu GB)\n", gib_int, gib_frac, gb_int, gb_frac);
~~~~~ ^~~~~~~
%03u
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sdcard_spi/main.c:355:48: error: format specifies type 'long' but the argument has type
'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
printf("available sectors on card: %li\n", sdcard_spi_get_sector_count(card));
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%u
6 errors generated.
[ ] drivers_sx127x some format errors
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sx127x/main.c:225:21: error: format specifies type 'int' but the argument has type
'unsigned long' [-Werror,-Wformat]
argv[1], strlen(argv[1]) + 1);
^~~~~~~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/tests/driver_sx127x/main.c:322:24: error: format specifies type 'unsigned long' but the argument has type
'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
sx127x_get_time_on_air((const sx127x_t*)dev, len));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat] DEBUG("[DEBUG] Set RX timeout: %lu\n", timeout);
%u
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:97:50: note: expanded from macro 'DEBUG'
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:56:20: note: expanded from macro 'DEBUG_PRINT'
printf(__VA_ARGS__); \
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/drivers/sx127x/sx127x_getset.c:823:44: error: format specifies type 'unsigned long' but the argument has
type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
DEBUG("[DEBUG] Set TX timeout: %lu\n", timeout);
~~~ ^~~~~~~
%u
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:97:50: note: expanded from macro 'DEBUG'
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
^~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/core/include/debug.h:56:20: note: expanded from macro 'DEBUG_PRINT'
printf(__VA_ARGS__); \
^~~~~~~~~~~
3 errors generated.
```
- [ ] emb6 **not sure this are legit errors**
```console
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:98:35: error: comparison of unsigned expression >= 0 is
always true [-Werror,-Wtautological-compare]
if( i_addr_byte == 0 && f >= 0 )
~ ^ ~
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:205:51: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
#define LOG_ERR(msg, ...) LOGGER_ERR(0,msg, ##__VA_ARGS__)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:223:138: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
...&& (LOGGER_LEVEL > log_lvl)) printf("%lu | err | %5s (%d)| " msg "\r\n", bsp_getSec(), __FILE__, __LINE__, ##__VA_ARGS__); }while (0)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:205:51: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
#define LOG_ERR(msg, ...) LOGGER_ERR(0,msg, ##__VA_ARGS__)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:223:138: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
...&& (LOGGER_LEVEL > log_lvl)) printf("%lu | err | %5s (%d)| " msg "\r\n", bsp_getSec(), __FILE__, __LINE__, ##__VA_ARGS__); }while (0)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:205:51: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
#define LOG_ERR(msg, ...) LOGGER_ERR(0,msg, ##__VA_ARGS__)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:223:138: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
...&& (LOGGER_LEVEL > log_lvl)) printf("%lu | err | %5s (%d)| " msg "\r\n", bsp_getSec(), __FILE__, __LINE__, ##__VA_ARGS__); }while (0)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:205:51: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
#define LOG_ERR(msg, ...) LOGGER_ERR(0,msg, ##__VA_ARGS__)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:223:138: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
...&& (LOGGER_LEVEL > log_lvl)) printf("%lu | err | %5s (%d)| " msg "\r\n", bsp_getSec(), __FILE__, __LINE__, ##__VA_ARGS__); }while (0)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:205:51: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
#define LOG_ERR(msg, ...) LOGGER_ERR(0,msg, ##__VA_ARGS__)
^
/Users/facosta/git/RIOT-OS/RIOT/tests/emb6/bin/pkg/native/emb6/utils/inc/logger.h:223:138: error: token pasting of ',' and __VA_ARGS__ is a
GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
...&& (LOGGER_LEVEL > log_lvl)) printf("%lu | err | %5s (%d)| " msg "\r\n", bsp_getSec(), __FILE__, __LINE__, ##__VA_ARGS__); }while (0)
^
11 errors generated.
```
- [ ] gnrc_lwmac **comparison errors**
```console
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/link_layer/lwmac/lwmac.c:225:27: error: comparison of integers of different signs: 'int' and
'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
if (rtt_get_counter() < last) {
~~~~~~~~~~~~~~~~~ ^ ~~~~
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/link_layer/lwmac/lwmac.c:234:17: error: comparison of integers of different signs: 'uint32_t'
(aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
while (last < (rtt_get_counter() + GNRC_LWMAC_RTT_EVENT_MARGIN_TICKS)) {
~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/link_layer/lwmac/rx_state_machine.c:211:55: error: format specifies type 'void *' but the
argument has type 'gnrc_pktsnip_t *' (aka 'struct gnrc_pktsnip *') [-Werror,-Wformat-pedantic]
LOG_DEBUG("[LWMAC-rx] Inspecting pkt @ %p\n", pkt);
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/link_layer/lwmac/lwmac.c:801:91: error: format specifies type 'void *' but the argument has
type 'gnrc_pktsnip_t *' (aka 'struct gnrc_pktsnip *') [-Werror,-Wformat-pedantic]
LOG_ERROR("ERROR: [LWMAC] Can't push RX packet @ %p, memory full?\n", pkt);
```
That's what I found so far. Though, I'm not sure if all of them are true positives, but we might want to address them at some point.
@kYc0o, if I'm not mistaken, Clang is now part of the CI (for native at least). So all issues here should be fixed now, right ?
I'll test again this compile issues to be completely sure they're gone before closing.
@kYc0o maybe also have a look at #9809
ping @kYc0o
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.
Here you have a list of compiling issues I found using clang (with its respective PRs):
[x] tests_driver_adcxx1c fixed in #7856.
[x] tests_driver_at86rf2xx fixed in #7860
And some more which came after this one was solved.
[x] tests_driver_enc28j60 fixed in #7857
[x] tests_driver_encx24j600 fixed in #7858
[x] tests_driver_isl29125 fixed in #7854
[ ] tests_driver_lsm6dsl I don't have a solution for this, not sure is a problem...
[x] tests_driver_nrf24l01p_lowlevel fixed in #7855
[x] tests_driver_pdc8544 fixed in #7859
[ ] tests_driver_pn532 I don't have a solution for this one.
[ ] tests_driver_sdcard_spi fixed in #7853
[x] tests_driver_servo fixed in #7852
[x] tests_driver_sx127x fixed in #7851
[ ] lwmac have a ton of warnings, however it requires more exhaustive testing. Also, AFAIK it will be reworked to comply with netif2.
[x] tests_periph_flashpage I don't have a fix for this one yet.
I tried to make
size_t i = 0
but then it throws an error on the case whichi
cannot be less than 0...[x] tests_periph_i2c didn't fix yet
[x] tests_periph_pwm don't have a fix yet
So far is what I found. This is an effort towards #1121.