From ad7fda33dd5fa6243cf26df20bed1fbaccfa8601 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sun, 15 Oct 2023 00:13:15 +1100 Subject: [PATCH] aux: fix -Werror=sign-compare constant comparison --- internal/cgen/auxiliary/cbor.cc | 2 +- internal/cgen/auxiliary/json.cc | 2 +- release/c/wuffs-unsupported-snapshot.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cgen/auxiliary/cbor.cc b/internal/cgen/auxiliary/cbor.cc index fb55a5d7..b834c339 100644 --- a/internal/cgen/auxiliary/cbor.cc +++ b/internal/cgen/auxiliary/cbor.cc @@ -197,7 +197,7 @@ DecodeCbor(DecodeCborCallbacks& callbacks, goto done; } depth++; - if (depth > WUFFS_CBOR__DECODER_DEPTH_MAX_INCL) { + if (depth > (int32_t)WUFFS_CBOR__DECODER_DEPTH_MAX_INCL) { ret_error_message = "wuffs_aux::DecodeCbor: internal error: bad depth"; goto done; diff --git a/internal/cgen/auxiliary/json.cc b/internal/cgen/auxiliary/json.cc index ffef6124..33153bf7 100644 --- a/internal/cgen/auxiliary/json.cc +++ b/internal/cgen/auxiliary/json.cc @@ -446,7 +446,7 @@ DecodeJson(DecodeJsonCallbacks& callbacks, goto done; } depth++; - if (depth > WUFFS_JSON__DECODER_DEPTH_MAX_INCL) { + if (depth > (int32_t)WUFFS_JSON__DECODER_DEPTH_MAX_INCL) { ret_error_message = "wuffs_aux::DecodeJson: internal error: bad depth"; goto done; diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index 76b770f3..b8f60cd3 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -64623,7 +64623,7 @@ DecodeCbor(DecodeCborCallbacks& callbacks, goto done; } depth++; - if (depth > WUFFS_CBOR__DECODER_DEPTH_MAX_INCL) { + if (depth > (int32_t)WUFFS_CBOR__DECODER_DEPTH_MAX_INCL) { ret_error_message = "wuffs_aux::DecodeCbor: internal error: bad depth"; goto done; @@ -65852,7 +65852,7 @@ DecodeJson(DecodeJsonCallbacks& callbacks, goto done; } depth++; - if (depth > WUFFS_JSON__DECODER_DEPTH_MAX_INCL) { + if (depth > (int32_t)WUFFS_JSON__DECODER_DEPTH_MAX_INCL) { ret_error_message = "wuffs_aux::DecodeJson: internal error: bad depth"; goto done;