mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
log: initialize pos to help the compiler
Although pos will be set to 0 in the first iteration, the compiler does
not seem to figure this out, so help it a little:
../spa/include/spa/support/log.h:306:21: warning: ‘pos’ may be used uninitialized [-Wmaybe-uninitialized]
306 | pos += sprintf(str + pos, "%02x ", buf[i]); \
| ^~
../spa/include/spa/support/log.h:301:13: note: ‘pos’ was declared here
301 | int pos; \
| ^~~
This commit is contained in:
parent
2c72597271
commit
968bc382af
1 changed files with 1 additions and 1 deletions
|
|
@ -298,7 +298,7 @@ do { \
|
|||
char str[512]; \
|
||||
uint8_t *buf = (uint8_t *)data; \
|
||||
size_t i; \
|
||||
int pos; \
|
||||
int pos = 0; \
|
||||
\
|
||||
for (i = 0; i < len; i++) { \
|
||||
if (i % 16 == 0) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue