diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2022-10-25 17:24:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 17:24:07 +0300 |
commit | bf1cb6048ba63438d0173f86d62ee4106bdcece6 (patch) | |
tree | a0bbb737fbf0e9d9d21e272b938c47aface2850f /web | |
parent | cd9cdbe01d7e29d463d9ea621db959839f85db0b (diff) |
Use print macros (#13876)
* use print macros
* cast instead
Diffstat (limited to 'web')
-rw-r--r-- | web/api/formatters/json_wrapper.c | 24 | ||||
-rw-r--r-- | web/api/queries/query.c | 4 | ||||
-rw-r--r-- | web/api/queries/weights.c | 24 | ||||
-rw-r--r-- | web/api/web_api_v1.c | 8 |
4 files changed, 30 insertions, 30 deletions
diff --git a/web/api/formatters/json_wrapper.c b/web/api/formatters/json_wrapper.c index 5a0abd0d83..8b9b7522c0 100644 --- a/web/api/formatters/json_wrapper.c +++ b/web/api/formatters/json_wrapper.c @@ -58,23 +58,23 @@ void rrdr_json_wrapper_begin(RRDR *r, BUFFER *wb, uint32_t format, RRDR_OPTIONS " %sapi%s: 1,\n" " %sid%s: %s%s%s,\n" " %sname%s: %s%s%s,\n" - " %sview_update_every%s: %ld,\n" - " %supdate_every%s: %ld,\n" - " %sfirst_entry%s: %ld,\n" - " %slast_entry%s: %ld,\n" - " %sbefore%s: %ld,\n" - " %safter%s: %ld,\n" + " %sview_update_every%s: %lld,\n" + " %supdate_every%s: %lld,\n" + " %sfirst_entry%s: %lld,\n" + " %slast_entry%s: %lld,\n" + " %sbefore%s: %lld,\n" + " %safter%s: %lld,\n" " %sgroup%s: %s%s%s,\n" " %soptions%s: %s" , kq, kq , kq, kq, sq, qt->id, sq , kq, kq, sq, qt->id, sq - , kq, kq, r->update_every - , kq, kq, qt->db.minimum_latest_update_every - , kq, kq, qt->db.first_time_t - , kq, kq, qt->db.last_time_t - , kq, kq, r->before - , kq, kq, r->after + , kq, kq, (long long)r->update_every + , kq, kq, (long long)qt->db.minimum_latest_update_every + , kq, kq, (long long)qt->db.first_time_t + , kq, kq, (long long)qt->db.last_time_t + , kq, kq, (long long)r->before + , kq, kq, (long long)r->after , kq, kq, sq, web_client_api_request_v1_data_group_to_string(group_method), sq , kq, kq, sq); diff --git a/web/api/queries/query.c b/web/api/queries/query.c index dcf21dd93d..a2cc6460fd 100644 --- a/web/api/queries/query.c +++ b/web/api/queries/query.c @@ -2069,8 +2069,8 @@ RRDR *rrd2rrdr(ONEWAYALLOC *owa, QUERY_TARGET *qt) { dimensions_used++; if (timeout && ((NETDATA_DOUBLE)dt_usec(&query_start_time, &query_current_time) / 1000.0) > (NETDATA_DOUBLE)timeout) { - log_access("QUERY CANCELED RUNTIME EXCEEDED %0.2f ms (LIMIT %ld ms)", - (NETDATA_DOUBLE)dt_usec(&query_start_time, &query_current_time) / 1000.0, timeout); + log_access("QUERY CANCELED RUNTIME EXCEEDED %0.2f ms (LIMIT %lld ms)", + (NETDATA_DOUBLE)dt_usec(&query_start_time, &query_current_time) / 1000.0, (long long)timeout); r->result_options |= RRDR_RESULT_OPTION_CANCEL; break; } diff --git a/web/api/queries/weights.c b/web/api/queries/weights.c index 703f1c7053..b249fa02f5 100644 --- a/web/api/queries/weights.c +++ b/web/api/queries/weights.c @@ -119,25 +119,25 @@ static void results_header_to_json(DICTIONARY *results __maybe_unused, BUFFER *w WEIGHTS_STATS *stats) { buffer_sprintf(wb, "{\n" - "\t\"after\": %ld,\n" - "\t\"before\": %ld,\n" - "\t\"duration\": %ld,\n" + "\t\"after\": %lld,\n" + "\t\"before\": %lld,\n" + "\t\"duration\": %lld,\n" "\t\"points\": %zu,\n", - after, - before, - before - after, + (long long)after, + (long long)before, + (long long)(before - after), points ); if(method == WEIGHTS_METHOD_MC_KS2 || method == WEIGHTS_METHOD_MC_VOLUME) buffer_sprintf(wb, "" - "\t\"baseline_after\": %ld,\n" - "\t\"baseline_before\": %ld,\n" - "\t\"baseline_duration\": %ld,\n" + "\t\"baseline_after\": %lld,\n" + "\t\"baseline_before\": %lld,\n" + "\t\"baseline_duration\": %lld,\n" "\t\"baseline_points\": %zu,\n", - baseline_after, - baseline_before, - baseline_before - baseline_after, + (long long)baseline_after, + (long long)baseline_before, + (long long)(baseline_before - baseline_after), points << shifts ); diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index ff8368b2fc..fb8c4bf545 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -1538,11 +1538,11 @@ static void web_client_api_v1_dbengine_stats_for_tier(BUFFER *wb, size_t tier) { ",\n\t\t\"metrics_pages\":%zu" ",\n\t\t\"extents_compressed_bytes\":%zu" ",\n\t\t\"pages_uncompressed_bytes\":%zu" - ",\n\t\t\"pages_duration_secs\":%ld" + ",\n\t\t\"pages_duration_secs\":%lld" ",\n\t\t\"single_point_pages\":%zu" ",\n\t\t\"first_t\":%llu" ",\n\t\t\"last_t\":%llu" - ",\n\t\t\"database_retention_secs\":%ld" + ",\n\t\t\"database_retention_secs\":%lld" ",\n\t\t\"average_compression_savings\":%0.2f" ",\n\t\t\"average_point_duration_secs\":%0.2f" ",\n\t\t\"average_metric_retention_secs\":%0.2f" @@ -1573,11 +1573,11 @@ static void web_client_api_v1_dbengine_stats_for_tier(BUFFER *wb, size_t tier) { , stats.metrics_pages , stats.extents_compressed_bytes , stats.pages_uncompressed_bytes - , stats.pages_duration_secs + , (long long)stats.pages_duration_secs , stats.single_point_pages , stats.first_t , stats.last_t - , stats.database_retention_secs + , (long long)stats.database_retention_secs , stats.average_compression_savings , stats.average_point_duration_secs , stats.average_metric_retention_secs |