posix.cfg: Improved configuration of mq_timedsend().

This commit is contained in:
orbitcowboy 2022-12-22 11:58:32 +01:00
parent f5b9445767
commit 347c10db3b
2 changed files with 10 additions and 1 deletions

View File

@ -3101,6 +3101,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<arg nr="2" direction="in"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
<not-null/>
<minsize type="argvalue" arg="3"/> <minsize type="argvalue" arg="3"/>
<strz/> <strz/>
</arg> </arg>
@ -3111,6 +3112,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/> <not-uninit/>
</arg> </arg>
<arg nr="5" direction="in"> <arg nr="5" direction="in">
<not-null/>
<not-uninit/> <not-uninit/>
<not-bool/> <not-bool/>
</arg> </arg>

View File

@ -36,6 +36,13 @@
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
void nullPointer_mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec* abs_timeout) {
// cppcheck-suppress nullPointer
(void) mq_timedsend(mqdes, NULL, msg_len, msg_prio, abs_timeout);
// cppcheck-suppress nullPointer
(void) mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);
}
#if __TRACE_H__ // <trace.h> #if __TRACE_H__ // <trace.h>
void nullPointer_posix_trace_event(trace_event_id_t event_id, const void* restrictdata_ptr, size_t data_len) void nullPointer_posix_trace_event(trace_event_id_t event_id, const void* restrictdata_ptr, size_t data_len)