tests: rtc: rename shadow variables
Rename shadow variables found by -Wshadow. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
19939dc7de
commit
8eb73aa5e2
2 changed files with 4 additions and 4 deletions
|
@ -96,7 +96,7 @@ ZTEST(rtc_api, test_alarm)
|
||||||
time_set.tm_isdst = -1;
|
time_set.tm_isdst = -1;
|
||||||
time_set.tm_nsec = 0;
|
time_set.tm_nsec = 0;
|
||||||
|
|
||||||
for (uint8_t i = 0; i < 2; i++) {
|
for (uint8_t k = 0; k < 2; k++) {
|
||||||
/* Set RTC time */
|
/* Set RTC time */
|
||||||
ret = rtc_set_time(rtc, &time_set);
|
ret = rtc_set_time(rtc, &time_set);
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,10 @@ ZTEST(rtc_api, test_alarm_callback)
|
||||||
k_sleep(K_SECONDS(RTC_TEST_ALARM_TEST_CALLED_DELAY));
|
k_sleep(K_SECONDS(RTC_TEST_ALARM_TEST_CALLED_DELAY));
|
||||||
|
|
||||||
/* Validate alarm callback called */
|
/* Validate alarm callback called */
|
||||||
for (uint16_t i = 0; i < alarms_count; i++) {
|
for (uint16_t j = 0; j < alarms_count; j++) {
|
||||||
callback_called_status =
|
callback_called_status =
|
||||||
(i % 2) ? atomic_test_bit(&callback_called_mask_odd, i)
|
(j % 2) ? atomic_test_bit(&callback_called_mask_odd, j)
|
||||||
: atomic_test_bit(&callback_called_mask_even, i);
|
: atomic_test_bit(&callback_called_mask_even, j);
|
||||||
|
|
||||||
zassert_equal(callback_called_status, true,
|
zassert_equal(callback_called_status, true,
|
||||||
"Alarm callback should have been called");
|
"Alarm callback should have been called");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue