From 5b5990ab8093aa408f91de456b3ce7284dc35d63 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Apr 2024 08:46:46 +0200 Subject: [PATCH 1/2] fix decl requiring c99 --- hdrhistogram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdrhistogram.c b/hdrhistogram.c index c24d1eb..baf9281 100644 --- a/hdrhistogram.c +++ b/hdrhistogram.c @@ -673,7 +673,8 @@ PHP_FUNCTION(hdr_export) int64_t found = 0; zend_long skipped = 0; - for (int32_t i = 0; i < hdr->counts_len; i++) { + int32_t i; + for (i = 0; i < hdr->counts_len; i++) { if (found >= hdr->total_count) { break; } From 3f378645578cae0a48bb98a01153353adc104d85 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Apr 2024 08:47:29 +0200 Subject: [PATCH 2/2] fix warning [-Wunused-but-set-variable] --- hdrhistogram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hdrhistogram.c b/hdrhistogram.c index baf9281..842ad26 100644 --- a/hdrhistogram.c +++ b/hdrhistogram.c @@ -775,6 +775,7 @@ PHP_FUNCTION(hdr_import) zend_ulong num_key; int bucket = 0; ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(value), num_key, key, item) { + (void)num_key; if (!key && bucket < hdr->counts_len) { convert_to_long_ex(item); if (Z_LVAL_P(item) > 0) {