From f1cc43a995271737b6e45d53380fa7fcf039e4ee Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 15 Nov 2025 22:06:01 +0000 Subject: [PATCH] flash_image.c: fix `clang` build Without the change the build fails on `clang as: /build/bladeRF/host/utilities/bladeRF-cli/src/cmd/flash_image.c:71:35: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare] 71 | if (val[i] >= 'a' || val[i] <= 'f') { | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ I think it flags real error. Let's use `&&` to catch the range. --- host/utilities/bladeRF-cli/src/cmd/flash_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/utilities/bladeRF-cli/src/cmd/flash_image.c b/host/utilities/bladeRF-cli/src/cmd/flash_image.c index 28d648875..16985a8b9 100644 --- a/host/utilities/bladeRF-cli/src/cmd/flash_image.c +++ b/host/utilities/bladeRF-cli/src/cmd/flash_image.c @@ -68,7 +68,7 @@ static int handle_param(const char *param, char *val, status = CLI_RET_INVPARAM; } else { for (i = 0; i < len && status == 0; i++) { - if (val[i] >= 'a' || val[i] <= 'f') { + if (val[i] >= 'a' && val[i] <= 'f') { val[i] -= 'a' - 'A'; } else if (!((val[i] >= '0' && val[i] <= '9') || (val[i] >= 'A' && val[i] <= 'F'))) {