mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-24 09:18:33 +03:00
firmware: Enable -Wformat and resolve all related compiler warnings
There have been tons of format-string related bugs in our code which we never discovered due to disabling -Wformat. Let's fix that. Change-Id: I5ec466361bcc526fac1f4897673264ee5af3458b
This commit is contained in:
@@ -215,7 +215,7 @@ static void update_wt(uint8_t wi, uint8_t d)
|
||||
wt_d = d;
|
||||
}
|
||||
wt = wt_wi*960UL*wt_d;
|
||||
TRACE_INFO("WT updated to %u\n\r", wt);
|
||||
TRACE_INFO("WT updated to %lu\n\r", wt);
|
||||
}
|
||||
|
||||
/*! Allocate USB buffer and push + initialize simtrace_msg_hdr
|
||||
@@ -325,7 +325,7 @@ static void print_flags(const struct value_string* flag_meanings, uint32_t nb_fl
|
||||
uint32_t i;
|
||||
for (i = 0; i < nb_flags; i++) {
|
||||
if (flags & flag_meanings[i].value) {
|
||||
printf(flag_meanings[i].str);
|
||||
printf("%s", flag_meanings[i].str);
|
||||
flags &= ~flag_meanings[i].value;
|
||||
if (flags) {
|
||||
printf(", ");
|
||||
|
||||
Reference in New Issue
Block a user