Browse Source

debug.h: Fix print format of chan in CLOGCHAN

Under armv7l arch, size_t is actually an unsigned int and not a long
unsigned int, and compiler errors:

CommonLibs/debug.h:28:24: error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 8 has type ‘size_t {aka unsigned int}’ [-Werror=format=]

Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8
changes/27/17227/1
Pau Espin 3 years ago
parent
commit
5291e8a654
  1. 2
      CommonLibs/debug.h

2
CommonLibs/debug.h

@ -25,5 +25,5 @@ pid_t my_gettid(void);
} while(0)
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
LOGP(category, level, "[tid=%ld][chan=%lu] " fmt, (long int) my_gettid(), chan, ##args); \
LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) my_gettid(), chan, ##args); \
} while(0)

Loading…
Cancel
Save