From a59e510cdc64e60796cda55806188ad5d878330f Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Fri, 3 Jun 2022 10:06:32 +0200 Subject: [PATCH] Fixed FP - invalidFunctionArgStr, found with daca@home: ftp://ftp.de.debian.org/debian/pool/main/i/ion/ion_3.2.1+dfsg.orig.tar.gz; ion-open-source/arch-rtems/pmqlsi.c:146:18: error: Invalid mq_send() argument nr 2. A nul-terminated string is required. [invalidFunctionArgStr] --- cfg/posix.cfg | 3 ++- test/cfg/posix.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index b9aa5b118..cad50db53 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -3026,14 +3026,15 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - + 0: + 0: diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 47c1baffc..4ff1ab5f7 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -35,6 +35,13 @@ #include #include +int invalidFunctionArgStr_mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio) +{ + const char msg = '0'; + (void) mq_send(mqdes, &msg, 1, 0); + return mq_send(mqdes, msg_ptr, msg_len, 0); +} + void invalidFunctionArgStr_mbsnrtowcs(void) { wchar_t wenough[10];