1
Programming / Re: Compiling a PM sample with GCC (2023)
« on: November 21, 2023, 02:32:30 pm »Can you please give me a hand with this warning?Quotegcc -Wall -Zomf -c -O2 pmstars.c -o pmstars.obj
pmstars.c: In function 'ClientWndProc':
pmstars.c:60:16: warning: variable 'my_timer' set but not used [-Wunused-but-set-variable]
60 | static ULONG my_timer; /* System (PM) number indicating unique (system) timer number
| ^~~~~~~~
Calling WinStopTimer on it at cleanup time might be the most "proper" way of dealing with that. However, a quicker and cheaper way of eliminating the warning is probably to add:
Code: [Select]
if ( my_timer ) {;} /* stop compiler from complaining */
after the call to WinStartTimer.