mardi 16 juin 2020

Fixing "-Wunused-parameter" warning wich depends on pre-processor conditions

How to fix the "-Wunused-parameter" warning when the use of variable depends on the preprocessor-directive(#if, #else ...) conditions.

void foo(std::string& color)
{
#ifdef PRINT
    printf("Printing color: ", color);
#endif
}

Aucun commentaire:

Enregistrer un commentaire