posix.cfg: improve configuration for dlsym()

This commit is contained in:
amai2012 2019-01-12 21:50:02 +01:00
parent 6eca26a4cf
commit 2adf65968b
2 changed files with 3 additions and 0 deletions

View File

@ -95,6 +95,7 @@
<function name="dlsym">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<returnValue type="void*"/>
<arg nr="1">
<not-uninit/>

View File

@ -343,6 +343,8 @@ void dl(const char* libname, const char* func)
// cppcheck-suppress uninitvar
// cppcheck-suppress unreadVariable
void* sym = dlsym(lib, funcname);
// cppcheck-suppress ignoredReturnValue
dlsym(lib, "foo");
void* uninit;
// cppcheck-suppress uninitvar
dlclose(uninit);