gnu.cfg: Added support for error() function. And a TODO testcase for ticket #11197.
This commit is contained in:
parent
4894cdab8f
commit
4de443957c
10
cfg/gnu.cfg
10
cfg/gnu.cfg
|
@ -1585,6 +1585,16 @@
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- https://man7.org/linux/man-pages/man3/error.3.html -->
|
||||||
|
<!-- void error(int status, int errnum, const char *format, ...); -->
|
||||||
|
<function name="error">
|
||||||
|
<noreturn>true</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<returnValue type="void"/>
|
||||||
|
<arg nr="any" direction="in">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
</function>
|
||||||
<!-- ########## Resource allocation ########## -->
|
<!-- ########## Resource allocation ########## -->
|
||||||
<resource>
|
<resource>
|
||||||
<alloc init="true">mkostemp</alloc>
|
<alloc init="true">mkostemp</alloc>
|
||||||
|
|
|
@ -23,7 +23,15 @@
|
||||||
#include <sys/epoll.h>
|
#include <sys/epoll.h>
|
||||||
#endif
|
#endif
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
#include <error.h>
|
||||||
|
|
||||||
|
void unreachableCode_error(void) // #11197
|
||||||
|
{
|
||||||
|
error(1, 0, ""); // will call exit() if the first parameter is non-zero
|
||||||
|
// cppcheck-suppress unusedVariable
|
||||||
|
// TODO cppcheck-suppress unreachableCode
|
||||||
|
int i;
|
||||||
|
}
|
||||||
|
|
||||||
int nullPointer_getservent_r(struct servent *restrict result_buf, char *restrict buf, size_t buflen, struct servent **restrict result)
|
int nullPointer_getservent_r(struct servent *restrict result_buf, char *restrict buf, size_t buflen, struct servent **restrict result)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue