@cryptotaxi247 / netdata-1 / commits / 43a7bab79

fix for format string signess

Costa Tsaousis (ktsaou) committed Jun 17, 2016 at 01:05 UTC 43a7bab79b214ce017520a20a935e8f16a5512c9
1 file changed +4 -4
src/apps_plugin.c
+4 -4
@@ -92,12 +92,12 @@ void *check_allocation(const char *file, int line, const char *function, void *m
92
93 // fprintf(stderr, "MEMORY_POINTER: Checking pointer at %p, real %p for %s/%u@%s.\n", marked_ptr, (void *)(marked_ptr - MALLOC_PREFIX), function, line, file);
94
95 - if(real_ptr[0] != MALLOC_MARK) fatal("MEMORY: prefix MARK is not valid for %s/%u@%s.", function, line, file);
95 + if(real_ptr[0] != MALLOC_MARK) fatal("MEMORY: prefix MARK is not valid for %s/%d@%s.", function, line, file);
96
97 size_t size = real_ptr[1];
98
99 uint32_t *end_ptr = (uint32_t *)(marked_ptr + size);
100 - if(end_ptr[0] != MALLOC_MARK) fatal("MEMORY: suffix MARK of allocation with size %zu is not valid for %s/%u@%s.", size, function, line, file);
100 + if(end_ptr[0] != MALLOC_MARK) fatal("MEMORY: suffix MARK of allocation with size %zu is not valid for %s/%d@%s.", size, function, line, file);
101
102 if(size_without_overheads_ptr) *size_without_overheads_ptr = size;
103
@@ -106,12 +106,12 @@ void *check_allocation(const char *file, int line, const char *function, void *m
106
107 void *malloc_debug(const char *file, int line, const char *function, size_t size) {
108 void *ptr = malloc(size + MALLOC_OVERHEAD);
109 - if(!ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%u@%s.", size, function, line, file);
109 + if(!ptr) fatal("MEMORY: Cannot allocate %zu bytes for %s/%d@%s.", size, function, line, file);
110
111 allocations.allocated += size;
112 allocations.allocations++;
113
114 - debug(D_MEMORY, "MEMORY: Allocated %zu bytes for %s/%u@%s."
114 + debug(D_MEMORY, "MEMORY: Allocated %zu bytes for %s/%d@%s."
115 " Status: allocated %zu in %zu allocs."
116 , size
117 , function, line, file