Fix the remaining compiler warnings on MacOS/clang

Clang doesn't like the gcc pragmas to ignore warnings; since
this is used just to ignore unused variables, we can use the
Q_UNUSED() macro instead (which just expands to (void)name
anyway which is portable).

I now get completely clean builds on Windows (MinGW-gcc), Linux and MacOS. Yay!