Skip to content

Commit

Permalink
util/cbmem: Fix test case 3 compilation
Browse files Browse the repository at this point in the history
Removed unused variable

repos/apache-mynewt-core/util/cbmem/selftest/src/testcases/
    cbmem_test_case_3.c:29:9: error: variable 'i' set but not
    used [-Werror,-Wunused-but-set-variable]
4941
    int i;
4942
        ^
4943
1 error generated.
  • Loading branch information
sjanc committed Oct 30, 2024
1 parent 519ce54 commit f860739
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions util/cbmem/selftest/src/testcases/cbmem_test_case_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ TEST_CASE_SELF(cbmem_test_case_3)
uint16_t off;
uint16_t len;
uint8_t buf[128];
int i;
int rc;

i = 0;
cbmem_iter_start(&cbmem1, &iter);
while (1) {
hdr = cbmem_iter_next(&cbmem1, &iter);
Expand All @@ -54,7 +52,6 @@ TEST_CASE_SELF(cbmem_test_case_3)
TEST_ASSERT_FATAL(len == CBMEM1_ENTRY_SIZE,
"Couldn't read full entry, expected %d got %d",
CBMEM1_ENTRY_SIZE, len);
i++;

/* go apesh*t, and read data out of bounds, see what we get. */
rc = cbmem_read(&cbmem1, hdr, buf, CBMEM1_ENTRY_SIZE * 2, sizeof(buf));
Expand Down

0 comments on commit f860739

Please sign in to comment.