metacall/core

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

Opened this issue ยท 0 comments

๐Ÿš€ 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.