cflags: add -Wformat=2 -Wformat-overflow -Wformat-truncation#9355
cflags: add -Wformat=2 -Wformat-overflow -Wformat-truncation#9355miri64 merged 5 commits intoRIOT-OS:masterfrom
Conversation
0c1bebf to
404ff8d
Compare
| struct tm timeinfo; | ||
| size_t read_bytes = cbor_deserialize_date_time(stream, offset, &timeinfo); | ||
| strftime(buf, sizeof(buf), "%c", &timeinfo); | ||
| strftime(buf, sizeof(buf), TIMESTRING_FORMAT, &timeinfo); |
There was a problem hiding this comment.
Here, "%c" has been replaced by a date format. Was that an old remaining bug ?
There was a problem hiding this comment.
One of the warnings activated in this PR triggered on %c. I don't remember which warning, I just wanted to fix this in the least intrusive way possible since the module is deprecated and will be removed soon
There was a problem hiding this comment.
Sorry, I missed that it was strftime and not just printf which is why I did not understand.
And yes it silents the warning on native.
There was a problem hiding this comment.
Just for reference, if someone is interested, this date output changed:
- from:
Thu Jul 5 15:57:27 2018 - to:
2018-07-05T15:57:48Z
cladmi
left a comment
There was a problem hiding this comment.
Diff looks good, murdock is happy, ACK.
Just waiting for the other PR and rebase after.
|
Please rebase. #9358 was merged. |
|
Done |
|
Backport provided in #9608 |
Contribution description
Enables additional compile time checks for format strings used by printf, scanf, strftime.
Includes a fix for warnings in the (deprecated) sys/cbor module
Issues/PRs references
Related: #9243
Depends on: #9358,
#9357