Skip to content

Commit 654b5b5

Browse files
committed
common: Fix uninitialized reps in test-jsonfds
In practice the loop always sets it, but it triggers static code checkers: > src/common/test-jsonfds.c:320:32: > warning: 'reps' may be used uninitialized in this function [-Wmaybe-uninitialized] Side issue in https://issues.redhat.com/browse/RHEL-104798
1 parent 59c63df commit 654b5b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/test-jsonfds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ test_print_string_memory_safety (TestFixture *fixture,
273273
{
274274
guint residual = seq;
275275
gint length = 0;
276-
int reps;
276+
int reps = 0;
277277

278278
fixture->expected_end = stpcpy (fixture->expected_buffer, ", \"key\": \"");
279279

0 commit comments

Comments
 (0)