warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char* argv[])
^
warning: unused parameter 'argv' [-Wunused-parameter]
int main(int argc, char* argv[])
Change the definition of main
in:
int main()
{
// ...
it's standard compliant.
warning: unused parameter 'junk' [-Wunused-parameter]
void SetConsoleCtrlHandler(void (*func)(int), int junk)
Not naming a parameter is legal also in function implementation. This is useful when the function needs to declare the parameter to have a specific fixed signature, but the parameter is not needed (this may happen for example for a method in a derived class, for a callback function or for a template parameter).
So, if this is the case, you could change the function definition:
void SetConsoleCtrlHandler(void (*func)(int), int)
{
//...
If you control the header file, fix it! For the ones you don't (system, 3rd party libs...) you can use the -isystem flag (this will make them "system headers" and GCC/CLANG won't report warnings for them).
E.g.
QMAKE_CXXFLAGS += -isystem ...