I'm writing a program in C++ Win32 and I was at the status bar creation .. when I build to see if it works, (and that's what it does), but I get 2 warnings..
This is the piece of the code that I got 2 warnings..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
.
.
109
110 case WM_SIZE:
111 {
112 // Size status bar and get height
113 HWND hStatus;
114 RECT rcStatus;
115 int iStatusHeight;
116
117 hStatus = GetDlgItem(hWnd, IDC_STATUS);
118 iStatusHeight = rcStatus.bottom - rcStatus.top;
119 }
120 break;
121
.
.
|
||=== Build: Debug in Folder (compiler: GNU GCC Compiler) ===|
In function 'LRESULT WindowProcedure(HWND, UINT, WPARAM, LPARAM)
113|warning: variable 'hStatus' set but not used [-Wunused-but-set-variable]
115|warning: variable 'iStatusHeight' set but not used [-Wunused-but-set-variable]
||=== Build finished: 0 error(s), 2 warning(s) (0 minute(s), 1 second(s)) ===|
||=== Run: Debug in Folder (compiler: GNU GCC Compiler) ===|
I know is working perfectly but I wanna know why the compiler says that these variables are set but not in use..!?