// add this target
struct target *n = get_apps_groups_target(s, w, name);
if(!n) {
- error("Cannot create target '%s' (line %lu, word %lu)", s, line, word);
+ error("Cannot create target '%s' (line %zu, word %zu)", s, line, word);
continue;
}
}
static inline int is_major_enabled(int major) {
- static char *major_configs = NULL;
+ static int8_t *major_configs = NULL;
static size_t major_size = 0;
if(major < 0) return 1;
size_t wanted_size = (size_t)major + 1;
if(major_size < wanted_size) {
- major_configs = reallocz(major_configs, wanted_size);
+ major_configs = reallocz(major_configs, wanted_size * sizeof(int8_t));
size_t i;
for(i = major_size; i < wanted_size ; i++)
major_configs[major] = (char)config_get_boolean("plugin:proc:/proc/diskstats", buffer, 1);
}
- return major_configs[major];
+ return (int)major_configs[major];
}
int do_proc_diskstats(int update_every, usec_t dt) {
ff->size += PROCFILE_INCREMENT_BUFFER;
}
- debug(D_PROCFILE, "Reading file '%s', from position %ld with length %lu", procfile_filename(ff), s, ff->size - s);
+ debug(D_PROCFILE, "Reading file '%s', from position %ld with length %zu", procfile_filename(ff), s, ff->size - s);
r = read(ff->fd, &ff->data[s], ff->size - s);
if(unlikely(r == -1)) {
if(unlikely(!(ff->flags & PROCFILE_FLAG_NO_ERROR_ON_FILE_IO))) error(PF_PREFIX ": Cannot read from file '%s'", procfile_filename(ff));
}
else {
// microseconds has the time since the last collection
+#ifdef NETDATA_INTERNAL_CHECKS
usec_t now_usec = timeval_usec(&now);
usec_t last_usec = timeval_usec(&st->last_collected_time);
+#endif
usec_t since_last_usec = dt_usec(&now, &st->last_collected_time);
// verify the microseconds given is good
} // max_loop
- debug(D_RRD_STATS, "RRD_STATS_JSON: %s total %lu bytes", st->name, wb->len);
+ debug(D_RRD_STATS, "RRD_STATS_JSON: %s total %zu bytes", st->name, wb->len);
pthread_rwlock_unlock(&st->rwlock);
return last_timestamp;