I\'m interested in creating a macro for eliminating the unused variable warning.
This question describes a way to suppress the unused parameter warning by writing a
After testing and following the comments, the original version mentioned in the question turned out to be good enough.
Using: #define UNUSED(x) __pragma(warning(suppress:4100)) x
(mentioned in comments), might be necessary for compiling C on MSVC, but that's such a weird combination, that I didn't include it in the end.