File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,14 @@ void test_wscanf_s(void) {
2323 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors
2424 // CHECK-MESSAGES: [[@LINE-2]]:3: note: cast the expression to void to silence this warning
2525}
26+
27+ int remove (const char * path );
28+ int removeNonStdLibFunc (const char * path );
29+ void test_remove (void ) {
30+ remove ("123" );
31+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors
32+ // CHECK-MESSAGES: [[@LINE-2]]:3: note: cast the expression to void to silence this warning
33+ removeNonStdLibFunc ("123" );
34+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors
35+ // CHECK-MESSAGES: [[@LINE-2]]:3: note: cast the expression to void to silence this warning
36+ }
You can’t perform that action at this time.
0 commit comments