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;
}
+1 -1
View File
@@ -214,7 +214,7 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *
int j = 0;
for (; j < shlib->numfunc; ++j) {
if (shlib->funcarray[j].fptr == farray[i].fptr) {
int rc = strcmp(shlib->funcarray[i].fname, farray[i].fname);
int rc = strcmp(shlib->funcarray[j].fname, farray[i].fname);
AssertFatal(rc == 0,
"reloading the same fptr with different fnames (%s, %s)\n",
shlib->funcarray[i].fname, farray[i].fname);