mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
script: avoid gcc -Wstringop-overread for strnlen
This commit is contained in:
1 parent
ce1f59e9ce
commit
a7fb1e8d69
2 files changed
+2
-2
No files matched your search
@@ -418,7 +418,7 @@ compute_exit_code(const char* status_msg) {
|
||||
size_t n = strnlen(status_msg, 2047);
|
||||
if (n >= 2047) {
|
||||
status_msg = "main: internal error: error message is too long";
|
||||
n = strnlen(status_msg, 2047);
|
||||
n = strlen(status_msg);
|
||||
}
|
||||
fprintf(stderr, "%s\n", status_msg);
|
||||
// Return an exit code of 1 for regular (foreseen) errors, e.g. badly
|
||||
|
||||
@@ -307,7 +307,7 @@ compute_exit_code(const char* status_msg) {
|
||||
size_t n = strnlen(status_msg, 2047);
|
||||
if (n >= 2047) {
|
||||
status_msg = "main: internal error: error message is too long";
|
||||
n = strnlen(status_msg, 2047);
|
||||
n = strlen(status_msg);
|
||||
}
|
||||
fprintf(stderr, "%s\n", status_msg);
|
||||
// Return an exit code of 1 for regular (foreseen) errors, e.g. badly
|
||||
|
||||
Reference in new issue
Block a user