Warning "enumeration value ‘VTF_TOP_ALIGNED’ not handled in switch"

Create issue
Issue #1107 resolved
Yaron Cohen-Tal created an issue

I get that compiler warning when compiling CEGUI with GCC, revision "6da01e9c4ce1", file "cegui/src/WindowRendererSets/Core/StaticText.cpp" line 182. To eliminate the warning I've added a no-op for that case with a comment (I'll submit it soon), but a more thorough investigation is required.

Comments (2)

  1. Lukas Meindl

    Turn on extra warnings in GCC ("-Wall -Wextra"), and eliminate all of them.

    Other changes:

    • Add a CMake option "CEGUI_WARNINGS_AS_ERRORS" that makes the compiler treat all warnings as errors. It's "OFF" by default, but it's recommended that all developers of CEGUI itself set it to "ON"!
    • Add an optional argument to "cegui_add_dependency", "IS_SYSTEM", that determines whether to treat the headers of the dependency as system headers. This usually tells the compiler to ignore warnings in these headers.
    • Add a macro "CEGUI_UNUSED" to prevent warnings about an unused variable/parameter.
    • Add "-Wno-unused-parameter" to the C compilation flags used to compile the C source files generated by "tolua". Those are generated automatically, so we're not in control of the code.
    • There was a warning about an enumeration value not handled in switch. See issue #1107.

    → <<cset 4af6f5f2a31d>>

  2. Log in to comment