@cryptotaxi247 / netdata-1 / commits / 2420deb93

fixed minor printf formating issues regards signed numbers

Costa Tsaousis (ktsaou) committed Oct 16, 2016 at 03:45 UTC 2420deb931c0f5d6c6a12c81d317a5d736e16ddb
2 files changed +8 -8
src/health.c
+5 -5
@@ -141,7 +141,7 @@ static inline void health_alarm_log_load(RRDHOST *host) {
141 *s = '\0';
142 pointers[entries++] = s;
143 if(entries > max_entries) {
144 - error("Line %zd of file '%s' has more than %d entries. Ignoring excessive entries.", line, health.log_filename, max_entries);
144 + error("Line %zu of file '%s' has more than %d entries. Ignoring excessive entries.", line, health.log_filename, max_entries);
145 break;
146 }
147 }
@@ -152,7 +152,7 @@ static inline void health_alarm_log_load(RRDHOST *host) {
152 ALARM_ENTRY *ae = NULL;
153
154 if(entries < 26) {
155 - error("Line %zd of file '%s' should have at least 26 entries, but it has %d. Ignoring line.", line, health.log_filename, entries);
155 + error("Line %zu of file '%s' should have at least 26 entries, but it has %d. Ignoring line.", line, health.log_filename, entries);
156 continue;
157 }
158
@@ -169,7 +169,7 @@ static inline void health_alarm_log_load(RRDHOST *host) {
169
170 if(!ae) {
171 *pointers[0] = 'A';
172 - error("Line %zd of file '%s' updates alarm log entry with unique id %u, but it is not found.", line, health.log_filename, unique_id);
172 + error("Line %zu of file '%s' updates alarm log entry with unique id %u, but it is not found.", line, health.log_filename, unique_id);
173 }
174 }
175
@@ -179,7 +179,7 @@ static inline void health_alarm_log_load(RRDHOST *host) {
179 }
180
181 if(strcmp(pointers[1], host->hostname))
182 - error("Line %zd of file '%s' provides an alarm for host '%s' but this is named '%s'.", line, health.log_filename, pointers[1], host->hostname);
182 + error("Line %zu of file '%s' provides an alarm for host '%s' but this is named '%s'.", line, health.log_filename, pointers[1], host->hostname);
183
184 ae->unique_id = (uint32_t)strtoul(pointers[2], NULL, 16);
185 ae->alarm_id = (uint32_t)strtoul(pointers[3], NULL, 16);
@@ -244,7 +244,7 @@ static inline void health_alarm_log_load(RRDHOST *host) {
244 host->health_log.next_alarm_id = ae->alarm_id + 1;
245 }
246 else {
247 - error("Line %zd of file '%s' is invalid (unrecognized entry type '%s').", line, health.log_filename, pointers[0]);
247 + error("Line %zu of file '%s' is invalid (unrecognized entry type '%s').", line, health.log_filename, pointers[0]);
248 }
249 }
250
src/registry.c
+3 -3
@@ -767,7 +767,7 @@ int registry_log_load(void) {
767
768 // verify it is valid
769 if (unlikely(len < 85 || s[1] != '\t' || s[10] != '\t' || s[47] != '\t' || s[84] != '\t')) {
770 - error("Registry: log line %zu is wrong (len = %zu).", line, len);
770 + error("Registry: log line %zd is wrong (len = %zu).", line, len);
771 continue;
772 }
773 s[1] = s[10] = s[47] = s[84] = '\0';
@@ -782,7 +782,7 @@ int registry_log_load(void) {
782 char *url = name;
783 while(*url && *url != '\t') url++;
784 if(!*url) {
785 - error("Registry: log line %zu does not have a url.", line);
785 + error("Registry: log line %zd does not have a url.", line);
786 continue;
787 }
788 *url++ = '\0';
@@ -801,7 +801,7 @@ int registry_log_load(void) {
801 break;
802
803 default:
804 - error("Registry: ignoring line %zu of filename '%s': %s.", line, registry.log_filename, s);
804 + error("Registry: ignoring line %zd of filename '%s': %s.", line, registry.log_filename, s);
805 break;
806 }
807 }