Scan build: Argument with 'nonnull' attribute passed null

This commit is contained in:
mir
2023-10-31 11:53:42 +01:00
parent 82597e7e8f
commit e0ff84f67c
4 changed files with 7 additions and 3 deletions
+1
View File
@@ -79,6 +79,7 @@ int processoption(paramdef_t *cfgoptions, char *value) {
if ( value == NULL) {
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
AssertFatal(false, "[CONFIG] command line, requires an argument\n");
} else { /* boolean value option without argument, set value to true*/
tmpval = defbool;
}