@@ -1062,6 +1062,7 @@ void * memleak_mmap2() // #8327
10621062void memleak_getline () { // #11043
10631063 char * line = NULL ;
10641064 size_t size = 0 ;
1065+ // cppcheck-suppress valueFlowBailoutIncompleteVar
10651066 getline (& line , & size , stdin );
10661067 // cppcheck-suppress memleak
10671068 line = NULL ;
@@ -1082,6 +1083,7 @@ void memleak_getline_array(FILE* stream) { // #12498
10821083void memleak_getdelim (int delim ) {
10831084 char * line = NULL ;
10841085 size_t size = 0 ;
1086+ // cppcheck-suppress valueFlowBailoutIncompleteVar
10851087 getdelim (& line , & size , delim , stdin );
10861088 // cppcheck-suppress memleak
10871089 line = NULL ;
@@ -1101,6 +1103,7 @@ void memleak_getdelim_array(FILE* stream, int delim) {
11011103
11021104void * identicalCondition_mmap (int fd , size_t size ) // #9940
11031105{
1106+ // cppcheck-suppress valueFlowBailoutIncompleteVar
11041107 void * buffer = mmap (NULL , size , PROT_READ | PROT_WRITE , MAP_SHARED , fd , 0 );
11051108 if (buffer == MAP_FAILED ) {
11061109 return NULL ;
@@ -1113,6 +1116,7 @@ int munmap_no_double_free(int tofd, // #11396
11131116 size_t len )
11141117{
11151118 int rc ;
1119+ // cppcheck-suppress valueFlowBailoutIncompleteVar
11161120 const void * fptr = mmap (NULL ,len ,PROT_READ |PROT_WRITE ,MAP_SHARED ,fromfd ,(off_t )0 );
11171121 if (fptr == MAP_FAILED ) {
11181122 return -1 ;
@@ -1147,6 +1151,7 @@ void resourceLeak_fdopen(int fd)
11471151
11481152void resourceLeak_fdopen2 (const char * fn ) // #2767
11491153{
1154+ // cppcheck-suppress valueFlowBailoutIncompleteVar
11501155 int fi = open (fn , O_RDONLY );
11511156 FILE * fd = fdopen (fi , "r" );
11521157 fclose (fd );
@@ -1193,14 +1198,14 @@ void resourceLeak_socket(void)
11931198
11941199void resourceLeak_open1 (void )
11951200{
1196- // cppcheck-suppress unreadVariable
1201+ // cppcheck-suppress [ unreadVariable,valueFlowBailoutIncompleteVar]
11971202 int fd = open ("file" , O_RDWR | O_CREAT );
11981203 // cppcheck-suppress resourceLeak
11991204}
12001205
12011206void resourceLeak_open2 (void )
12021207{
1203- // cppcheck-suppress unreadVariable
1208+ // cppcheck-suppress [ unreadVariable,valueFlowBailoutIncompleteVar]
12041209 int fd = open ("file" , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
12051210 // cppcheck-suppress resourceLeak
12061211}
@@ -1213,6 +1218,7 @@ void noleak(int x, int y, int z)
12131218 closedir (p2 );
12141219 int s = socket (AF_INET ,SOCK_STREAM ,0 );
12151220 close (s );
1221+ // cppcheck-suppress valueFlowBailoutIncompleteVar
12161222 int fd1 = open ("a" , O_RDWR | O_CREAT );
12171223 close (fd1 );
12181224 int fd2 = open ("a" , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
@@ -1357,7 +1363,7 @@ void timet_h(const struct timespec* ptp1)
13571363 clockid_t clk_id1 , clk_id2 , clk_id3 ;
13581364 // cppcheck-suppress constVariablePointer
13591365 struct timespec * ptp ;
1360- // cppcheck-suppress uninitvar
1366+ // cppcheck-suppress [ uninitvar,valueFlowBailoutIncompleteVar]
13611367 clock_settime (CLOCK_REALTIME , ptp );
13621368 // cppcheck-suppress uninitvar
13631369 clock_settime (clk_id1 , ptp );
0 commit comments