Skip to content

Commit

Permalink
libpisp: backend_debug: Use unsigned int
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Jacopo Mondi committed Jul 2, 2024
1 parent b128cb1 commit 456ec75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libpisp/backend/backend_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 456ec75

Please sign in to comment.