mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 09:05:07 -05:00
fix printf()/scanf() format signedness
Fix mismatches between the format and sign of variables passed to printf() or scanf(), which were found in a Frama-C analysis and gcc using the -Wformat-signedness option.
This commit is contained in:
@@ -65,7 +65,7 @@ test_unit(void)
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG("records %d", ARR_GetSize(records));
|
||||
DEBUG_LOG("records %u", ARR_GetSize(records));
|
||||
TEST_CHECK(ARR_GetSize(records) == 64);
|
||||
|
||||
for (i = j = 0; i < 10000; i++) {
|
||||
@@ -76,7 +76,7 @@ test_unit(void)
|
||||
j++;
|
||||
}
|
||||
|
||||
DEBUG_LOG("requests %u responses %u", i, j);
|
||||
DEBUG_LOG("requests %d responses %d", i, j);
|
||||
TEST_CHECK(j * 4 < i && j * 6 > i);
|
||||
|
||||
CLG_Finalise();
|
||||
|
||||
@@ -82,7 +82,7 @@ test_unit(void)
|
||||
double passed_lo = DBL_MAX, passed_hi = DBL_MIN;
|
||||
|
||||
SRC_SelectSource(srcs[k]);
|
||||
DEBUG_LOG("source %d status %d", k, sources[k]->status);
|
||||
DEBUG_LOG("source %d status %u", k, sources[k]->status);
|
||||
|
||||
for (l = 0; l <= j; l++) {
|
||||
TEST_CHECK(sources[l]->status > SRC_OK && sources[l]->status <= SRC_SELECTED);
|
||||
|
||||
Reference in New Issue
Block a user