Skip to content

Commit 9a1b95f

Browse files
dcpleungfabiobaltieri
authored andcommitted
tests: posix: rename shadow variables
Rename shadow variables found by -Wshadow. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent ddf17df commit 9a1b95f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/posix/common/src/sleep.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct waker_work {
1212
k_tid_t tid;
1313
struct k_work_delayable dwork;
1414
};
15-
static struct waker_work ww;
15+
static struct waker_work wake_work;
1616

1717
static void waker_func(struct k_work *work)
1818
{
@@ -49,9 +49,9 @@ ZTEST(posix_apis, test_sleep)
4949
zassert_true((now - then) >= 2 * MSEC_PER_SEC);
5050

5151
/* test that sleep reports the remainder */
52-
ww.tid = k_current_get();
53-
k_work_init_delayable(&ww.dwork, waker_func);
54-
zassert_equal(1, k_work_schedule(&ww.dwork, K_SECONDS(sleep_min_s)));
52+
wake_work.tid = k_current_get();
53+
k_work_init_delayable(&wake_work.dwork, waker_func);
54+
zassert_equal(1, k_work_schedule(&wake_work.dwork, K_SECONDS(sleep_min_s)));
5555
zassert_true(sleep(sleep_max_s) >= sleep_rem_s);
5656
}
5757

@@ -80,9 +80,9 @@ ZTEST(posix_apis, test_usleep)
8080
zassert_equal(errno, EINVAL);
8181

8282
/* test that sleep reports errno = EINTR when woken up */
83-
ww.tid = k_current_get();
84-
k_work_init_delayable(&ww.dwork, waker_func);
85-
zassert_equal(1, k_work_schedule(&ww.dwork, K_USEC(USEC_PER_SEC / 2)));
83+
wake_work.tid = k_current_get();
84+
k_work_init_delayable(&wake_work.dwork, waker_func);
85+
zassert_equal(1, k_work_schedule(&wake_work.dwork, K_USEC(USEC_PER_SEC / 2)));
8686
zassert_equal(-1, usleep(USEC_PER_SEC - 1));
8787
zassert_equal(EINTR, errno);
8888
}

0 commit comments

Comments
 (0)