madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.55k stars 2.42k forks source link

add Werror/Wall/Wextra #933

Closed pmqs closed 6 months ago

pmqs commented 6 months ago

This change makes the existing cmake & configure workflows match the Werror setting used in the c_std workflow

madler commented 6 months ago

Applied. I thought for sure that everything was going to go to hell, but I got two green check marks!

pmqs commented 6 months ago

Applied. I thought for sure that everything was going to go to hell, but I got two green check marks!

I built it in a fork before pushing here.

madler commented 6 months ago

Thank you! (Actually, I made it more perilous than what you tested by adding a /W3 to the MSVC builds.)

pmqs commented 6 months ago

Thank you! (Actually, I made it more perilous than what you tested by adding a /W3 to the MSVC builds.)

I tried -Wall -Wextra with MSVC, but it outputted as sorts of crazy stuff. Thought prudent to leave well alone.

pmqs commented 6 months ago

@madler Just looking at the CLAGS line committed to develop in configure.yml

        CFLAGS: ${{ matrix.cflags }} -Werror

The one I posted had this, to make cmake.yml, std-c.yml & configure.yml all use the same warnings settings.

        CFLAGS: ${{ matrix.cflags }} -Werror -Wall -Wextra
madler commented 6 months ago

-Wall -Wextra are already there from the --warn option to configure.