Satisfy cppcheck CLI and logger checks
CI / lint (pull_request) Successful in 25s
CI / sanitizers (address) (pull_request) Successful in 35s
CI / sanitizers (undefined) (pull_request) Successful in 35s
CI / fuzz-build (pull_request) Successful in 14s
CI / coverage (pull_request) Successful in 31s
CI / build-and-test (pull_request) Successful in 1m14s
CI / valgrind (pull_request) Successful in 32s

This commit is contained in:
2026-08-11 21:14:56 +02:00
parent 679e389ba6
commit 852e47a143
+3 -3
View File
@@ -55,7 +55,7 @@ static bool parse_positive_int(const char* s, int* out_val) {
/* Duplicate a string argument into *dest, freeing the old value. Returns true on success, false on
* failure. */
static bool set_string_option(char** dest, const char* value, const char* option_name) {
static int set_string_option(char** dest, const char* value, const char* option_name) {
char* dup = str_dup(value);
if (!dup) {
fprintf(stderr, "Error: memory allocation failed for %s\n", option_name);
@@ -67,7 +67,7 @@ static bool set_string_option(char** dest, const char* value, const char* option
}
/* Parse a string as a positive integer into *dest. Returns true on success, false on error. */
static bool set_positive_int_option(int* dest, const char* value, const char* option_name) {
static int set_positive_int_option(int* dest, const char* value, const char* option_name) {
if (!parse_positive_int(value, dest)) {
fprintf(stderr, "Error: %s must be a positive integer\n", option_name);
return -1;
@@ -76,7 +76,7 @@ static bool set_positive_int_option(int* dest, const char* value, const char* op
}
/* Parse a string as a non-negative integer into *dest. Returns true on success, false on error. */
static bool set_nonneg_int_option(int* dest, const char* value, const char* option_name) {
static int set_nonneg_int_option(int* dest, const char* value, const char* option_name) {
if (!parse_nonneg_int(value, dest)) {
fprintf(stderr, "Error: %s must be a non-negative integer\n", option_name);
return -1;