I have a project where it is necessary to have many, many stub functions with unused parameters. The project must also compile under both GCC and MSVC. A function like this:
void DogFunc(char HappyBone)
{ }
...will generate an unused variable warning in GCC. I can get around this by enclosing the variable name in comments, like so:
void DogFunc(char /* HappyBone */ )
{ }
...but then VC will not compile it, giving me "
error C2055: expected formal parameter list, not a type list"
.
I can do some dummy assigns on the parameters to get both compilers to shut up, but maybe there is a more elegant solution?
-Erik
____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals |
twitch stream |
youtube archive (NSFW)