Skip to content

Commit db0049c

Browse files
committed
tests: Address static analysis issues
Reported by Sonarcloud. Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
1 parent 0ee51b0 commit db0049c

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

tests/module/app/src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void test_trigger_interval_change_in_connected(void)
232232

233233
/* Cleanup */
234234
send_cloud_disconnected();
235-
check_no_events((WEEK_IN_SECONDS));
235+
check_no_events(WEEK_IN_SECONDS);
236236
}
237237

238238
/* This is required to be added to each test. That is because unity's

tests/module/battery/src/redef.c

+7
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@
99

1010
static int sample_fetch(const struct device *dev, enum sensor_channel chan)
1111
{
12+
ARG_UNUSED(dev);
13+
ARG_UNUSED(chan);
14+
1215
return 0;
1316
}
1417

1518
static int channel_get(const struct device *dev, enum sensor_channel chan,
1619
struct sensor_value *val)
1720
{
21+
ARG_UNUSED(dev);
22+
ARG_UNUSED(chan);
23+
ARG_UNUSED(val);
24+
1825
return 0;
1926
}
2027

tests/module/cloud/src/cloud_module_test.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ void test_connecting_backoff(void)
149149
{
150150
int err;
151151
struct network_msg msg = { .type = NETWORK_CONNECTED, };
152-
uint64_t connect_start_time, connect_duration_sec;
152+
uint64_t connect_start_time;
153+
uint64_t connect_duration_sec;
153154

154155
nrf_cloud_coap_connect_fake.return_val = -EAGAIN;
155156
connect_start_time = k_uptime_get();

tests/module/environmental/src/redef.c

+7
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@
99

1010
static int sample_fetch(const struct device *dev, enum sensor_channel chan)
1111
{
12+
ARG_UNUSED(dev);
13+
ARG_UNUSED(chan);
14+
1215
return 0;
1316
}
1417

1518
static int channel_get(const struct device *dev, enum sensor_channel chan,
1619
struct sensor_value *val)
1720
{
21+
ARG_UNUSED(dev);
22+
ARG_UNUSED(chan);
23+
ARG_UNUSED(val);
24+
1825
return 0;
1926
}
2027

tests/module/network/src/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ static void net_mgmt_add_event_callback_custom_fake(struct net_mgmt_event_callba
112112
static int lte_lc_system_mode_get_custom_fake(enum lte_lc_system_mode *mode,
113113
enum lte_lc_system_mode_preference *preference)
114114
{
115+
ARG_UNUSED(preference);
116+
115117
*mode = current_fake_system_mode;
116118

117119
return 0;
@@ -120,6 +122,8 @@ static int lte_lc_system_mode_get_custom_fake(enum lte_lc_system_mode *mode,
120122
static int lte_lc_system_mode_set_custom_fake(enum lte_lc_system_mode mode,
121123
enum lte_lc_system_mode_preference preference)
122124
{
125+
ARG_UNUSED(preference);
126+
123127
current_fake_system_mode = mode;
124128

125129
return 0;

0 commit comments

Comments
 (0)