fix for format string signess
Costa Tsaousis (ktsaou) committed
Jun 17, 2016 at 01:12 UTC
39fadbb09053b5108973c5a8b350ef501f967817
3 files changed
+9
-9
src/apps_plugin.c
+1
-1
@@ -166,7 +166,7 @@ void *realloc_debug(const char *file, int line, const char *function, void *ptr,
166
void *real_ptr = check_allocation(file, line, function, ptr, &old_size);
167
168
void *new_ptr = realloc(real_ptr, size + MALLOC_OVERHEAD);
169
- if(!new_ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%u@%s.", size, function, line, file);
169
+ if(!new_ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%d@%s.", size, function, line, file);
170
171
allocations.allocated += size;
172
allocations.allocated -= old_size;
src/proc_net_netstat.c
+1
-1
@@ -48,7 +48,7 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
48
}
49
words = procfile_linewords(ff, l);
50
if(words < 12) {
51
- error("Cannot read /proc/net/netstat IpExt line. Expected 12 params, read %d.", words);
51
+ error("Cannot read /proc/net/netstat IpExt line. Expected 12 params, read %u.", words);
52
continue;
53
}
54
src/proc_net_rpc_nfsd.c
+7
-7
@@ -196,7 +196,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
196
197
if(do_rc == 1 && strcmp(type, "rc") == 0) {
198
if(words < 4) {
199
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 4);
199
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 4);
200
continue;
201
}
202
@@ -210,7 +210,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
210
}
211
else if(do_fh == 1 && strcmp(type, "fh") == 0) {
212
if(words < 6) {
213
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 6);
213
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 6);
214
continue;
215
}
216
@@ -226,7 +226,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
226
}
227
else if(do_io == 1 && strcmp(type, "io") == 0) {
228
if(words < 3) {
229
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 3);
229
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 3);
230
continue;
231
}
232
@@ -239,7 +239,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
239
}
240
else if(do_th == 1 && strcmp(type, "th") == 0) {
241
if(words < 13) {
242
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 13);
242
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 13);
243
continue;
244
}
245
@@ -270,7 +270,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
270
}
271
else if(do_ra == 1 && strcmp(type, "ra") == 0) {
272
if(words < 13) {
273
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 13);
273
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 13);
274
continue;
275
}
276
@@ -299,7 +299,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
299
}
300
else if(do_net == 1 && strcmp(type, "net") == 0) {
301
if(words < 5) {
302
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 5);
302
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 5);
303
continue;
304
}
305
@@ -314,7 +314,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
314
}
315
else if(do_rpc == 1 && strcmp(type, "rpc") == 0) {
316
if(words < 6) {
317
- error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 6);
317
+ error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 6);
318
continue;
319
}
320