From 456ec754c3e8cdc633394963607f6ddcaaec7187 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 27 Jun 2024 14:52:37 +0200 Subject: [PATCH] libpisp: backend_debug: Use unsigned int The mainline version of pisp_be_config.h header defines the 'num_tiles' member of 'struct pisp_be_tiles_config' as an unsigned 32-bit value. Use an unsigned integer as loop variable to avoid the following compilation error: error: comparison of integer expressions of different signedness Signed-off-by: Jacopo Mondi --- src/libpisp/backend/backend_debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpisp/backend/backend_debug.cpp b/src/libpisp/backend/backend_debug.cpp index ace43dd..26267bd 100644 --- a/src/libpisp/backend/backend_debug.cpp +++ b/src/libpisp/backend/backend_debug.cpp @@ -501,7 +501,7 @@ std::string BackEnd::GetJsonConfig(pisp_be_tiles_config *config) j["config"].push_back(b); } - for (int t = 0; t < config->num_tiles; t++) + for (unsigned int t = 0; t < config->num_tiles; t++) { json b; for (auto const &field : tiles_config.fields)