From 347c10db3b721f6a270765ce086eb75a45d14aeb Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Thu, 22 Dec 2022 11:58:32 +0100 Subject: [PATCH] posix.cfg: Improved configuration of mq_timedsend(). --- cfg/posix.cfg | 4 +++- test/cfg/posix.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index 5890e904e..f07f8fe8b 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -3101,6 +3101,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3111,6 +3112,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -4766,7 +4768,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - + false diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 0bf820c79..ad7260402 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -36,6 +36,13 @@ #include #include +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__ // void nullPointer_posix_trace_event(trace_event_id_t event_id, const void* restrictdata_ptr, size_t data_len)