*new* check_macros: find macro precedence bugs
[smatch.git] / validation / sm_wine_filehandles.c
blob296b11398a10406ff6d5ac992bb938e67ddd51fb
1 void * CreateFile();
2 void * socket();
4 int func (void)
6 int *x;
8 if (x = CreateFile()) {
12 x = socket();
13 if (x != 0) {
16 return;
19 * check-name: use INVALID_HANDLE_VALUE not zero
20 * check-command: smatch -p=wine sm_wine_filehandles.c
22 * check-output-start
23 sm_wine_filehandles.c +8 func(4) error: comparing a filehandle against zero 'x'
24 sm_wine_filehandles.c +13 func(9) error: comparing a filehandle against zero 'x'
25 * check-output-end