noncoresec: Fix build errors with DEBUG set to 1
Fix these build errors, which are generated if DEBUG is set to 1: ../../core/net/llsec/noncoresec/noncoresec.c: In function 'parse': ../../core/net/llsec/noncoresec/noncoresec.c:198:54: error: expected ')' before 'PRIu32' PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ ../../core/net/llsec/noncoresec/noncoresec.c:198:12: warning: spurious trailing '%' in format [-Wformat=] PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ ../../core/net/llsec/noncoresec/noncoresec.c:198:12: warning: spurious trailing '%' in format [-Wformat=] PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ ../../core/net/llsec/noncoresec/noncoresec.c:231:54: error: expected ')' before 'PRIu32' PRINTF("noncoresec: received replayed frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ ../../core/net/llsec/noncoresec/noncoresec.c:231:15: warning: spurious trailing '%' in format [-Wformat=] PRINTF("noncoresec: received replayed frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ ../../core/net/llsec/noncoresec/noncoresec.c:231:15: warning: spurious trailing '%' in format [-Wformat=] PRINTF("noncoresec: received replayed frame %"PRIu32"\n", ^ ../../core/net/llsec/noncoresec/noncoresec.c:88:28: note: in definition of macro 'PRINTF' #define PRINTF(...) printf(__VA_ARGS__) ^ PRIu32 is not defined, so replace it with a standard format directive. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
parent
a8989f9f1c
commit
8fd7719c07
|
@ -195,7 +195,7 @@ parse(void)
|
|||
packetbuf_set_datalen(packetbuf_datalen() - MIC_LEN);
|
||||
|
||||
if(!aead(result, 0)) {
|
||||
PRINTF("noncoresec: received unauthentic frame %"PRIu32"\n",
|
||||
PRINTF("noncoresec: received unauthentic frame %lu\n",
|
||||
anti_replay_get_counter());
|
||||
return FRAMER_FAILED;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ parse(void)
|
|||
anti_replay_init_info(info);
|
||||
} else {
|
||||
if(anti_replay_was_replayed(info)) {
|
||||
PRINTF("noncoresec: received replayed frame %"PRIu32"\n",
|
||||
PRINTF("noncoresec: received replayed frame %lu\n",
|
||||
anti_replay_get_counter());
|
||||
return FRAMER_FAILED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue