core icon indicating copy to clipboard operation
core copied to clipboard

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

Open viferga opened this issue 6 months ago • 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.

https://github.com/metacall/core/blob/cb8429fc559e4a028441f7865bee0ed5e7e899ab/cmake/Warnings.cmake#L49 https://github.com/metacall/core/blob/cb8429fc559e4a028441f7865bee0ed5e7e899ab/cmake/Warnings.cmake#L80 https://github.com/metacall/core/blob/cb8429fc559e4a028441f7865bee0ed5e7e899ab/cmake/Warnings.cmake#L89 https://github.com/metacall/core/blob/cb8429fc559e4a028441f7865bee0ed5e7e899ab/cmake/Warnings.cmake#L109

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.

viferga avatar Apr 25 '25 15:04 viferga