Revert changes from 9cb0941df2.

This commit is contained in:
orbitcowboy 2017-02-02 15:53:52 +01:00
parent 9cb0941df2
commit beb72c2583
2 changed files with 3 additions and 4 deletions

View File

@ -1058,7 +1058,6 @@
<!-- size_t fread(void *ptr, size_t size, size_t nobj, FILE *stream); --> <!-- size_t fread(void *ptr, size_t size, size_t nobj, FILE *stream); -->
<function name="fread,std::fread"> <function name="fread,std::fread">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<use-retval/>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
<not-null/> <not-null/>

View File

@ -48,12 +48,12 @@ void bufferAccessOutOfBounds(void)
// cppcheck-suppress bufferAccessOutOfBounds // cppcheck-suppress bufferAccessOutOfBounds
// cppcheck-suppress redundantCopy // cppcheck-suppress redundantCopy
strncpy(a,"abcde",6); strncpy(a,"abcde",6);
(void)fread(a,1,5,stdin); fread(a,1,5,stdin);
// cppcheck-suppress bufferAccessOutOfBounds // cppcheck-suppress bufferAccessOutOfBounds
(void)fread(a,1,6,stdin); fread(a,1,6,stdin);
fwrite(a,1,5,stdout); fwrite(a,1,5,stdout);
// cppcheck-suppress bufferAccessOutOfBounds // cppcheck-suppress bufferAccessOutOfBounds
(void)fread(a,1,6,stdout); fread(a,1,6,stdout);
} }
// memory leak // memory leak