posix.cfg: Added support for strxfrm_l (#5839)
Reference: - https://pubs.opengroup.org/onlinepubs/9699919799/functions/strxfrm_l.html
This commit is contained in:
parent
42c3aebda9
commit
950b285608
|
@ -4179,6 +4179,30 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
||||||
<valid>0:</valid>
|
<valid>0:</valid>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/strxfrm_l.html -->
|
||||||
|
<!-- size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, locale_t locale) -->
|
||||||
|
<function name="strxfrm_l">
|
||||||
|
<returnValue type="size_t"/>
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<!-- In case the 3rd argument is 0, the 1st argument is permitted to be a null pointer. (#6306) -->
|
||||||
|
<arg nr="1" direction="out">
|
||||||
|
<minsize type="argvalue" arg="3"/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
<not-uninit/>
|
||||||
|
<strz/>
|
||||||
|
<minsize type="argvalue" arg="3"/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-uninit/>
|
||||||
|
<valid>0:</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
</function>
|
||||||
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/asctime.html -->
|
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/functions/asctime.html -->
|
||||||
<!-- char *asctime_r(const struct tm *tm, char *buf); -->
|
<!-- char *asctime_r(const struct tm *tm, char *buf); -->
|
||||||
<function name="asctime_r">
|
<function name="asctime_r">
|
||||||
|
|
|
@ -31,14 +31,18 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#include <xlocale.h>
|
||||||
|
#endif
|
||||||
#if !(defined(__APPLE__) && defined(__MACH__))
|
#if !(defined(__APPLE__) && defined(__MACH__))
|
||||||
#include <mqueue.h>
|
#include <mqueue.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <string.h>
|
|
||||||
#include <strings.h>
|
|
||||||
|
|
||||||
#if !(defined(__APPLE__) && defined(__MACH__))
|
#if !(defined(__APPLE__) && defined(__MACH__))
|
||||||
void nullPointer_mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec* abs_timeout) {
|
void nullPointer_mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec* abs_timeout) {
|
||||||
|
@ -102,6 +106,17 @@ int nullPointer_posix_trace_getnext_event(trace_id_t trid, struct posix_trace_ev
|
||||||
}
|
}
|
||||||
#endif // __TRACE_H__
|
#endif // __TRACE_H__
|
||||||
|
|
||||||
|
size_t nullPointer_strxfrm_l(char *restrict dest, const char *restrict src, size_t count, locale_t locale)
|
||||||
|
{
|
||||||
|
(void)strxfrm_l(dest, src, count, locale);
|
||||||
|
// In case the 3rd argument is 0, the 1st argument is permitted to be a null pointer. (#6306)
|
||||||
|
(void)strxfrm_l(NULL, src, 0, locale);
|
||||||
|
(void)strxfrm_l(NULL, src, 1, locale);
|
||||||
|
(void)strxfrm_l(NULL, src, count, locale);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
return strxfrm_l(dest, NULL, count, locale);
|
||||||
|
}
|
||||||
|
|
||||||
void nullPointer_pthread_attr_getstack(const pthread_attr_t *attr, void *stackaddr, size_t stacksize) {
|
void nullPointer_pthread_attr_getstack(const pthread_attr_t *attr, void *stackaddr, size_t stacksize) {
|
||||||
// cppcheck-suppress nullPointer
|
// cppcheck-suppress nullPointer
|
||||||
(void) pthread_attr_getstack(NULL, &stackaddr, &stacksize);
|
(void) pthread_attr_getstack(NULL, &stackaddr, &stacksize);
|
||||||
|
|
Loading…
Reference in New Issue