Closed argilo closed 1 year ago
The following warning appears when building m17-gateway-link_demod.cpp:
/home/argilo/git/m17-tools/apps/m17-gateway-link_demod.cpp:297:13: warning: extra tokens at end of #ifdef directive 297 | #ifdef WIN32: | ^
The #ifdef in question appears to be a workaround for the min macro defined in windows.h (https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included), but there are better ways to work around the issue. Here I've added the template parameter to std::min instead, which should avoid the macro expansion.
#ifdef
min
windows.h
std::min
Note: I have not tested this on Windows.
Colon removed.
Let's hope it works ;-)
The following warning appears when building m17-gateway-link_demod.cpp:
The
#ifdef
in question appears to be a workaround for themin
macro defined inwindows.h
(https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included), but there are better ways to work around the issue. Here I've added the template parameter tostd::min
instead, which should avoid the macro expansion.Note: I have not tested this on Windows.