@cryptotaxi247 / netdata-1 / commits / f5c3fe6ba

fix for format string signess

Costa Tsaousis (ktsaou) committed Jun 17, 2016 at 01:02 UTC f5c3fe6ba9a99ca67dc7c0628f9d88ab25b8b4d8
2 files changed +6 -7
src/apps_plugin.c
+4 -4
@@ -398,7 +398,7 @@ struct target *get_users_target(uid_t uid)
398 users_root_target = w;
399
400 if(unlikely(debug))
401 - fprintf(stderr, "apps.plugin: added uid %d ('%s') target\n", w->uid, w->name);
401 + fprintf(stderr, "apps.plugin: added uid %u ('%s') target\n", w->uid, w->name);
402
403 return w;
404 }
@@ -436,7 +436,7 @@ struct target *get_groups_target(gid_t gid)
436 groups_root_target = w;
437
438 if(unlikely(debug))
439 - fprintf(stderr, "apps.plugin: added gid %d ('%s') target\n", w->gid, w->name);
439 + fprintf(stderr, "apps.plugin: added gid %u ('%s') target\n", w->gid, w->name);
440
441 return w;
442 }
@@ -1995,7 +1995,7 @@ void calculate_netdata_statistics(void)
1995 w = p->user_target;
1996 else {
1997 if(unlikely(debug && p->user_target))
1998 - fprintf(stderr, "apps.plugin: \t\tpid %d (%s) switched user from %d (%s) to %d.\n", p->pid, p->comm, p->user_target->uid, p->user_target->name, p->uid);
1998 + fprintf(stderr, "apps.plugin: \t\tpid %d (%s) switched user from %u (%s) to %u.\n", p->pid, p->comm, p->user_target->uid, p->user_target->name, p->uid);
1999
2000 w = p->user_target = get_users_target(p->uid);
2001 }
@@ -2013,7 +2013,7 @@ void calculate_netdata_statistics(void)
2013 w = p->group_target;
2014 else {
2015 if(unlikely(debug && p->group_target))
2016 - fprintf(stderr, "apps.plugin: \t\tpid %d (%s) switched group from %d (%s) to %d.\n", p->pid, p->comm, p->group_target->gid, p->group_target->name, p->gid);
2016 + fprintf(stderr, "apps.plugin: \t\tpid %d (%s) switched group from %u (%s) to %u.\n", p->pid, p->comm, p->group_target->gid, p->group_target->name, p->gid);
2017
2018 w = p->group_target = get_groups_target(p->gid);
2019 }
src/storage_number.h
+2 -3
@@ -16,9 +16,8 @@ typedef long double collected_number;
16 #define COLLECTED_NUMBER_FORMAT "%0.7Lf"
17 */
18
19 -typedef int32_t storage_number;
20 -typedef uint32_t ustorage_number;
21 -#define STORAGE_NUMBER_FORMAT "%d"
19 +typedef uint32_t storage_number;
20 +#define STORAGE_NUMBER_FORMAT "%u"
21
22 #define SN_NOT_EXISTS (0x0 << 24)
23 #define SN_EXISTS (0x1 << 24)