Skip to content

Enable all compiler warnings and solve them (GCC, Clang, MSVC) #561

@viferga

Description

@viferga

🚀 Feature

In our compiler infrastructure we already enable many warnings but it will be interesting to enable all of them and solve them. Many are pretty easy to solve like -Wshadow, which is solved by changing the name of a variable for example.

# TODO: Uncomment the rest of the warnings, enable Weverything for clang

# C only flags

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") # /Wall

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") # /Wall

This would improve the code quality, eventually if all of them are solved, we can also enable -Werror so any warning is treated as error and we improve the code quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions