Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_rf2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int rf2xx_set_txpower(const struct device *dev, int16_t dbm)
dbm = max;
}

idx = abs(((float)(dbm - max) / step));
idx = abs((int) (((float)(dbm - max) / step)));
LOG_DBG("Tx-power idx: %d", idx);

if (idx >= conf->tx_pwr_table_size) {
Expand Down
12 changes: 6 additions & 6 deletions subsys/net/lib/zperf/zperf_tcp_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ static void tcp_server_session(void)
goto use_existing_ipv4;
}
} else {
use_existing_ipv4:
/* Use existing IP */
const struct in_addr *addr =
zperf_get_default_if_in4_addr();
const struct in_addr *addr;
use_existing_ipv4:
addr = zperf_get_default_if_in4_addr();
if (!addr) {
NET_ERR("Unable to get IPv4 by default");
goto error;
Expand Down Expand Up @@ -215,10 +215,10 @@ static void tcp_server_session(void)
goto use_existing_ipv6;
}
} else {
use_existing_ipv6:
/* Use existing IP */
const struct in6_addr *addr =
zperf_get_default_if_in6_addr();
const struct in6_addr *addr;
use_existing_ipv6:
addr = zperf_get_default_if_in6_addr();
if (!addr) {
NET_ERR("Unable to get IPv6 by default");
goto error;
Expand Down
2 changes: 1 addition & 1 deletion tests/kernel/context/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static void _test_kernel_cpu_idle(int atomic)
k_cpu_idle();
}
dt = k_uptime_ticks() - t0;
zassert_true(abs(dt - dur) <= slop,
zassert_true(abs((int32_t) (dt - dur)) <= slop,
"Inaccurate wakeup, idled for %d ticks, expected %d",
dt, dur);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/cbprintf/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ ZTEST(prf, test_d_length)
PRF_CHECK("3060399406/1876543210", rc);

if (!IS_ENABLED(CONFIG_CBPRINTF_NANO)) {
TEST_PRF(&rc, "%hd/%hd", min, max);
TEST_PRF(&rc, "%hd/%hd", (short) min, (short) max);
PRF_CHECK("-722/-14614", rc);

TEST_PRF(&rc, "%hhd/%hhd", min, max);
TEST_PRF(&rc, "%hhd/%hhd", (char) min, (char) max);
PRF_CHECK("46/-22", rc);
}

Expand Down Expand Up @@ -601,10 +601,10 @@ ZTEST(prf, test_x_length)
return;
}

TEST_PRF(&rc, "%hx/%hX", min, max);
TEST_PRF(&rc, "%hx/%hX", (short) min, (short) max);
PRF_CHECK("2c1c/2D1D", rc);

TEST_PRF(&rc, "%hhx/%hhX", min, max);
TEST_PRF(&rc, "%hhx/%hhX", (char) min, (char) max);
PRF_CHECK("1c/1D", rc);

if (IS_ENABLED(CONFIG_CBPRINTF_FULL_INTEGRAL)) {
Expand Down