gnu.cfg: Improved configuration for memrchr().

This commit is contained in:
orbitcowboy 2022-05-01 18:10:19 +02:00
parent 6f6ddb99b2
commit 6ad5a94acf
2 changed files with 10 additions and 1 deletions

View File

@ -1127,6 +1127,7 @@
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>

View File

@ -21,9 +21,17 @@
#ifndef __CYGWIN__
#include <sys/epoll.h>
#endif
#include <strings.h>
void *bufferAccessOutOfBounds_memrchr(const void *s, int c, size_t n)
{
char buf[42]={0};
(void)memrchr(buf,c,42);
// cppcheck-suppress bufferAccessOutOfBounds
(void)memrchr(buf,c,43);
return memrchr(s,c,n);
}
void knownConditionTrueFalse_ffsl(long i)
{
// ffs() returns the position of the first bit set, or 0 if no bits are set in i.