Commit 12b1bf5
committed
Fix pthread_t format warning for fprintf
This change fixes the following compilation build warning:
logger.c:117:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type 'pthread_t' {aka 'struct __pthread *'} [-Wformat=]
117 | fprintf(log_fp, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
| ~~^
| |
| long int
118 | log_ident, getpid(), pthread_self(), message);
| ~~~~~~~~~~~~~~
| |
| pthread_t {aka struct __pthread *}
logger.c:124:47: warning: format '%li' expects argument of type 'long int', but argument 7 has type 'pthread_t' {aka 'struct __pthread *'} [-Wformat=]
124 | fprintf(stderr, "%s %s %s[%d.%li]: %s\n", time_buf, hostname,
| ~~^
| |
| long int
125 | log_ident, getpid(), pthread_self(), message);
| ~~~~~~~~~~~~~~
| |
| pthread_t {aka struct __pthread *}
Signed-off-by: Florian Eckert <[email protected]>1 parent 7f45d2c commit 12b1bf5
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments