mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 09:32:44 +01:00
tests: fix misc cppcheck warnings
This commit is contained in:
parent
6928c5d4ed
commit
908429eb33
@ -33,7 +33,6 @@ int main(void)
|
||||
{
|
||||
hdc1000_t dev;
|
||||
int16_t temp, hum;
|
||||
size_t len;
|
||||
char tstr[8];
|
||||
char hstr[8];
|
||||
|
||||
@ -49,6 +48,7 @@ int main(void)
|
||||
}
|
||||
|
||||
while (1) {
|
||||
size_t len;
|
||||
hdc1000_read(&dev, &temp, &hum);
|
||||
|
||||
len = fmt_s16_dfp(tstr, temp, 2);
|
||||
|
@ -50,6 +50,8 @@ int main(void)
|
||||
ret = pn532_init_i2c(&pn532, &pn532_conf[0]);
|
||||
#elif defined(PN532_SUPPORT_SPI)
|
||||
ret = pn532_init_spi(&pn532, &pn532_conf[0]);
|
||||
#else
|
||||
#error None of PN532_SUPPORT_I2C and PN532_SUPPORT_SPI set!
|
||||
#endif
|
||||
|
||||
if (ret != 0) {
|
||||
|
@ -77,6 +77,8 @@ int main(void)
|
||||
#endif
|
||||
|
||||
puts("On-board LED test\n");
|
||||
/* cppcheck-suppress knownConditionTrueFalse
|
||||
* rationale: board-dependent ifdefs */
|
||||
if (numof == 0) {
|
||||
puts("NO LEDs AVAILABLE");
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ int main(void)
|
||||
uint8_t buf[LIMIT];
|
||||
|
||||
puts("\nHWRNG peripheral driver test\n");
|
||||
printf("This test will print from 1 to %i random bytes about every "
|
||||
printf("This test will print from 1 to %u random bytes about every "
|
||||
"second\n\n", LIMIT);
|
||||
|
||||
puts("Initializing the HWRNG driver.\n");
|
||||
|
@ -68,7 +68,7 @@ int main(void) {
|
||||
void *res;
|
||||
pthread_join(th_id, (void **) &res);
|
||||
|
||||
printf("Result: %u\n", (int) (intptr_t) res);
|
||||
printf("Result: %i\n", (int) (intptr_t) res);
|
||||
puts("Done.");
|
||||
return 0;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ void tests_crypto(void);
|
||||
*/
|
||||
Test *tests_crypto_chacha_tests(void);
|
||||
|
||||
static inline int compare(uint8_t a[16], uint8_t b[16], uint8_t len)
|
||||
static inline int compare(uint8_t *a, uint8_t *b, uint8_t len)
|
||||
{
|
||||
int result = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user