Fix compilation warnings (#16006)
Stelios Fragkakis committed
Sep 19, 2023 at 15:13 UTC
f07a55346a888fe4928522b6ae5381cde14667b6
6 files changed
+24
-24
collectors/freeipmi.plugin/freeipmi_plugin.c
+4
-4
@@ -1146,7 +1146,7 @@ int netdata_ipmi_detect_speed_secs(struct ipmi_monitoring_ipmi_config *ipmi_conf
1146
successful++;
1147
1148
if(unlikely(state->debug))
1149
- fprintf(stderr, "%s: %s data collection speed was %llu usec\n",
1149
+ fprintf(stderr, "%s: %s data collection speed was %"PRIu64" usec\n",
1150
program_name, netdata_collect_type_to_string(type), end - start);
1151
1152
// add it to our total
@@ -1307,7 +1307,7 @@ static size_t send_ipmi_sensor_metrics_to_netdata(struct netdata_ipmi_state *sta
1307
if(likely(sn->do_metric)) {
1308
if(unlikely(!is_sensor_updated(sn->last_collected_metric_ut, state->updates.now_ut, state->sensors.freq_ut))) {
1309
if(unlikely(state->debug))
1310
- fprintf(stderr, "%s: %s() sensor '%s' metric is not UPDATED (last updated %llu, now %llu, freq %llu\n",
1310
+ fprintf(stderr, "%s: %s() sensor '%s' metric is not UPDATED (last updated %"PRIu64", now %"PRIu64", freq %"PRIu64"\n",
1311
program_name, __FUNCTION__, sn->sensor_name, sn->last_collected_metric_ut, state->updates.now_ut, state->sensors.freq_ut);
1312
}
1313
else {
@@ -1360,7 +1360,7 @@ static size_t send_ipmi_sensor_metrics_to_netdata(struct netdata_ipmi_state *sta
1360
if(likely(sn->do_state)) {
1361
if(unlikely(!is_sensor_updated(sn->last_collected_state_ut, state->updates.now_ut, state->sensors.freq_ut))) {
1362
if (unlikely(state->debug))
1363
- fprintf(stderr, "%s: %s() sensor '%s' state is not UPDATED (last updated %llu, now %llu, freq %llu\n",
1363
+ fprintf(stderr, "%s: %s() sensor '%s' state is not UPDATED (last updated %"PRIu64", now %"PRIu64", freq %"PRIu64"\n",
1364
program_name, __FUNCTION__, sn->sensor_name, sn->last_collected_state_ut, state->updates.now_ut, state->sensors.freq_ut);
1365
}
1366
else {
@@ -1870,7 +1870,7 @@ int main (int argc, char **argv) {
1870
send_ipmi_sel_metrics_to_netdata(&state);
1871
1872
if(unlikely(debug))
1873
- fprintf(stderr, "%s: iteration %zu, dt %llu usec, sensors ever collected %zu, sensors last collected %zu \n"
1873
+ fprintf(stderr, "%s: iteration %zu, dt %"PRIu64" usec, sensors ever collected %zu, sensors last collected %zu \n"
1874
, program_name
1875
, iteration
1876
, dt
collectors/nfacct.plugin/plugin_nfacct.c
+1
-1
@@ -854,7 +854,7 @@ int main(int argc, char **argv) {
854
if(unlikely(netdata_exit)) break;
855
856
if(debug && iteration)
857
- fprintf(stderr, "nfacct.plugin: iteration %zu, dt %llu usec\n"
857
+ fprintf(stderr, "nfacct.plugin: iteration %zu, dt %"PRIu64" usec\n"
858
, iteration
859
, dt
860
);
collectors/plugins.d/pluginsd_parser.c
+4
-4
@@ -772,7 +772,7 @@ static void inflight_functions_insert_callback(const DICTIONARY_ITEM *item, void
772
}
773
else {
774
internal_error(LOG_FUNCTIONS,
775
- "FUNCTION '%s' with transaction '%s' sent to collector (%zd bytes, in %llu usec)",
775
+ "FUNCTION '%s' with transaction '%s' sent to collector (%zd bytes, in %"PRIu64" usec)",
776
string2str(pf->function), dictionary_acquired_item_name(item), ret,
777
pf->sent_ut - pf->started_ut);
778
}
@@ -789,7 +789,7 @@ static void inflight_functions_insert_callback(const DICTIONARY_ITEM *item, void
789
}
790
else {
791
internal_error(LOG_FUNCTIONS,
792
- "FUNCTION_PAYLOAD '%s' with transaction '%s' sent to collector (%zd bytes, in %llu usec)",
792
+ "FUNCTION_PAYLOAD '%s' with transaction '%s' sent to collector (%zd bytes, in %"PRIu64" usec)",
793
string2str(pf->function), dictionary_acquired_item_name(item), ret,
794
pf->sent_ut - pf->started_ut);
795
}
@@ -812,7 +812,7 @@ static void inflight_functions_delete_callback(const DICTIONARY_ITEM *item __may
812
struct inflight_function *pf = func;
813
814
internal_error(LOG_FUNCTIONS,
815
- "FUNCTION '%s' result of transaction '%s' received from collector (%zu bytes, request %llu usec, response %llu usec)",
815
+ "FUNCTION '%s' result of transaction '%s' received from collector (%zu bytes, request %"PRIu64" usec, response %"PRIu64" usec)",
816
string2str(pf->function), dictionary_acquired_item_name(item),
817
buffer_strlen(pf->result_body_wb), pf->sent_ut - pf->started_ut, now_realtime_usec() - pf->sent_ut);
818
@@ -833,7 +833,7 @@ static void inflight_functions_garbage_collect(PARSER *parser, usec_t now) {
833
dfe_start_write(parser->inflight.functions, pf) {
834
if (pf->timeout_ut < now) {
835
internal_error(true,
836
- "FUNCTION '%s' removing expired transaction '%s', after %llu usec.",
836
+ "FUNCTION '%s' removing expired transaction '%s', after %"PRIu64" usec.",
837
string2str(pf->function), pf_dfe.name, now - pf->started_ut);
838
839
if(!buffer_strlen(pf->result_body_wb) || pf->code == HTTP_RESP_OK)
database/engine/datafile.c
+3
-3
@@ -112,7 +112,7 @@ bool datafile_acquire_for_deletion(struct rrdengine_datafile *df) {
112
"but it has %u lockers (oc:%u, pd:%u), "
113
"%zu clean and %zu hot open cache pages "
114
"- will be deleted shortly "
115
- "(scanned open cache in %llu usecs)",
115
+ "(scanned open cache in %"PRIu64" usecs)",
116
df->fileno, df->ctx->config.tier,
117
df->users.lockers,
118
df->users.lockers_by_reason[DATAFILE_ACQUIRE_OPEN_CACHE],
@@ -129,7 +129,7 @@ bool datafile_acquire_for_deletion(struct rrdengine_datafile *df) {
129
"but it has %u lockers (oc:%u, pd:%u), "
130
"%zu clean and %zu hot open cache pages "
131
"- will be deleted now "
132
- "(scanned open cache in %llu usecs)",
132
+ "(scanned open cache in %"PRIu64" usecs)",
133
df->fileno, df->ctx->config.tier,
134
df->users.lockers,
135
df->users.lockers_by_reason[DATAFILE_ACQUIRE_OPEN_CACHE],
@@ -143,7 +143,7 @@ bool datafile_acquire_for_deletion(struct rrdengine_datafile *df) {
143
internal_error(true, "DBENGINE: datafile %u of tier %d "
144
"has %u lockers (oc:%u, pd:%u), "
145
"%zu clean and %zu hot open cache pages "
146
- "(scanned open cache in %llu usecs)",
146
+ "(scanned open cache in %"PRIu64" usecs)",
147
df->fileno, df->ctx->config.tier,
148
df->users.lockers,
149
df->users.lockers_by_reason[DATAFILE_ACQUIRE_OPEN_CACHE],
database/rrdset.c
+11
-11
@@ -1036,7 +1036,7 @@ void rrdset_timed_next(RRDSET *st, struct timeval now, usec_t duration_since_las
1036
last_time_s = now.tv_sec;
1037
1038
if(min_delta > permanent_min_delta) {
1039
- netdata_log_info("MINIMUM MICROSECONDS DELTA of thread %d increased from %lld to %lld (+%lld)", gettid(), permanent_min_delta, min_delta, min_delta - permanent_min_delta);
1039
+ netdata_log_info("MINIMUM MICROSECONDS DELTA of thread %d increased from %"PRIi64" to %"PRIi64" (+%"PRIi64")", gettid(), permanent_min_delta, min_delta, min_delta - permanent_min_delta);
1040
permanent_min_delta = min_delta;
1041
}
1042
@@ -1046,12 +1046,12 @@ void rrdset_timed_next(RRDSET *st, struct timeval now, usec_t duration_since_las
1046
#endif
1047
}
1048
1049
- netdata_log_debug(D_RRD_CALLS, "rrdset_timed_next() for chart %s with duration since last update %llu usec", rrdset_name(st), duration_since_last_update);
1050
- rrdset_debug(st, "NEXT: %llu microseconds", duration_since_last_update);
1049
+ netdata_log_debug(D_RRD_CALLS, "rrdset_timed_next() for chart %s with duration since last update %"PRIu64" usec", rrdset_name(st), duration_since_last_update);
1050
+ rrdset_debug(st, "NEXT: %"PRIu64" microseconds", duration_since_last_update);
1051
1052
internal_error(discarded && discarded != duration_since_last_update,
1053
- "host '%s', chart '%s': discarded data collection time of %llu usec, "
1054
- "replaced with %llu usec, reason: '%s'"
1053
+ "host '%s', chart '%s': discarded data collection time of %"PRIu64" usec, "
1054
+ "replaced with %"PRIu64" usec, reason: '%s'"
1055
, rrdhost_hostname(st->rrdhost)
1056
, rrdset_id(st)
1057
, discarded
@@ -1323,7 +1323,7 @@ static inline size_t rrdset_done_interpolate(
1323
1324
internal_error(iterations < 0,
1325
"RRDSET: '%s': iterations calculation wrapped! "
1326
- "first_ut = %llu, last_stored_ut = %llu, next_store_ut = %llu, now_collect_ut = %llu"
1326
+ "first_ut = %"PRIu64", last_stored_ut = %"PRIu64", next_store_ut = %"PRIu64", now_collect_ut = %"PRIu64""
1327
, rrdset_id(st)
1328
, first_ut
1329
, last_stored_ut
@@ -1356,8 +1356,8 @@ static inline size_t rrdset_done_interpolate(
1356
1357
rrdset_debug(st, "%s: CALC2 INC " NETDATA_DOUBLE_FORMAT " = "
1358
NETDATA_DOUBLE_FORMAT
1359
- " * (%llu - %llu)"
1360
- " / (%llu - %llu)"
1359
+ " * (%"PRIu64" - %"PRIu64")"
1360
+ " / (%"PRIu64" - %"PRIu64""
1361
, rrddim_name(rd)
1362
, new_value
1363
, rd->collector.calculated_value
@@ -1406,8 +1406,8 @@ static inline size_t rrdset_done_interpolate(
1406
1407
rrdset_debug(st, "%s: CALC2 DEF " NETDATA_DOUBLE_FORMAT " = ((("
1408
"(" NETDATA_DOUBLE_FORMAT " - " NETDATA_DOUBLE_FORMAT ")"
1409
- " * %llu"
1410
- " / %llu) + " NETDATA_DOUBLE_FORMAT, rrddim_name(rd)
1409
+ " * %"PRIu64""
1410
+ " / %"PRIu64") + " NETDATA_DOUBLE_FORMAT, rrddim_name(rd)
1411
, new_value
1412
, rd->collector.calculated_value, rd->collector.last_calculated_value
1413
, (next_store_ut - first_ut)
@@ -1541,7 +1541,7 @@ void rrdset_timed_done(RRDSET *st, struct timeval now, bool pending_rrdset_next)
1541
first_entry = 1;
1542
}
1543
1544
- rrdset_debug(st, "microseconds since last update: %llu", st->usec_since_last_update);
1544
+ rrdset_debug(st, "microseconds since last update: %"PRIu64"", st->usec_since_last_update);
1545
1546
// set last_collected_time
1547
if(unlikely(!st->last_collected_time.tv_sec)) {
streaming/sender.c
+1
-1
@@ -934,7 +934,7 @@ void stream_execute_function_callback(BUFFER *func_wb, int code, void *data) {
934
sender_commit(s, wb, STREAM_TRAFFIC_TYPE_FUNCTIONS);
935
sender_thread_buffer_free();
936
937
- internal_error(true, "STREAM %s [send to %s] FUNCTION transaction %s sending back response (%zu bytes, %llu usec).",
937
+ internal_error(true, "STREAM %s [send to %s] FUNCTION transaction %s sending back response (%zu bytes, %"PRIu64" usec).",
938
rrdhost_hostname(s->host), s->connected_to,
939
string2str(tmp->transaction),
940
buffer_strlen(func_wb),