]> arthur.barton.de Git - netdata.git/commitdiff
fix for format string signess
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 16 Jun 2016 22:12:30 +0000 (01:12 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 16 Jun 2016 22:12:30 +0000 (01:12 +0300)
src/apps_plugin.c
src/proc_net_netstat.c
src/proc_net_rpc_nfsd.c

index 5858c9ba5ba0133ff83648123e7fd2c320d2611c..900cde352da0574ad67cc413e45be65b144b59ec 100644 (file)
@@ -166,7 +166,7 @@ void *realloc_debug(const char *file, int line, const char *function, void *ptr,
        void *real_ptr = check_allocation(file, line, function, ptr, &old_size);
 
        void *new_ptr = realloc(real_ptr, size + MALLOC_OVERHEAD);
-       if(!new_ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%u@%s.", size, function, line, file);
+       if(!new_ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%d@%s.", size, function, line, file);
 
        allocations.allocated += size;
        allocations.allocated -= old_size;
index c8c12c1dbad9c2415c553407e9a9778897f28499..70d8cd68d0e6f018b648a06ce2bbdd00739ef7fd 100644 (file)
@@ -48,7 +48,7 @@ int do_proc_net_netstat(int update_every, unsigned long long dt) {
                        }
                        words = procfile_linewords(ff, l);
                        if(words < 12) {
-                               error("Cannot read /proc/net/netstat IpExt line. Expected 12 params, read %d.", words);
+                               error("Cannot read /proc/net/netstat IpExt line. Expected 12 params, read %u.", words);
                                continue;
                        }
 
index 6c6dd7066fc12b03ec8745fffe2efa40f15fa8c1..b5d766e057adcc04193c5dcad98330f5c104e02f 100644 (file)
@@ -196,7 +196,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
 
                if(do_rc == 1 && strcmp(type, "rc") == 0) {
                        if(words < 4) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 4);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 4);
                                continue;
                        }
 
@@ -210,7 +210,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_fh == 1 && strcmp(type, "fh") == 0) {
                        if(words < 6) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 6);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 6);
                                continue;
                        }
 
@@ -226,7 +226,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_io == 1 && strcmp(type, "io") == 0) {
                        if(words < 3) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 3);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 3);
                                continue;
                        }
 
@@ -239,7 +239,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_th == 1 && strcmp(type, "th") == 0) {
                        if(words < 13) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 13);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 13);
                                continue;
                        }
 
@@ -270,7 +270,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_ra == 1 && strcmp(type, "ra") == 0) {
                        if(words < 13) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 13);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 13);
                                continue;
                        }
 
@@ -299,7 +299,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_net == 1 && strcmp(type, "net") == 0) {
                        if(words < 5) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 5);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 5);
                                continue;
                        }
 
@@ -314,7 +314,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
                }
                else if(do_rpc == 1 && strcmp(type, "rpc") == 0) {
                        if(words < 6) {
-                               error("%s line of /proc/net/rpc/nfsd has %d words, expected %d", type, words, 6);
+                               error("%s line of /proc/net/rpc/nfsd has %u words, expected %d", type, words, 6);
                                continue;
                        }