[Libwebsockets] -Wall -Werror -Wextra enabled on lws builds

Jaco Kroon jaco at uls.co.za
Mon Jun 28 22:18:11 CEST 2021

Hi Andy,

__attribute__((unused)) for those cases may be useful, but I agree that
in general it's more of an annoyance than of real benefit.  In C++ you
simply don't name those arguments for for C this doesn't work.

Kind Regards,

On 2021/06/28 16:41, Andy Green wrote:

> Hi -
> I enabled -Wextra (with one override, -Wno-unused-parameter) on main
> today, since the big work earlier in the year to support -Wconversion
> -Wsign-compare had already done the heavy lifting, it only required a
> few fixes around oldstyle array definitions that had been leaving some
> members left implied.
> -Wunused-parameter is part of -Wextra, but it complains about things
> that I don't think are reasonable, for example we may have a function
> template and implementations that vary by platform or, eg, tls library
> backend.  Some implementations of particular functions do not need
> parameters that others do, but we have to define the api to provide
> anything that any implementation needs.  The implementations that
> don't reference parameters can be "fixed" by force-referencing the
> unused params with (void) casts, but I don't see adding all that mush
> actually achieves anything positive.  So I turned that specific one off.
> Since we already build with -Wall and unusually -Werror, adding
> -Wextra is a pretty significant milestone, despite it did not need
> huge changes.
> It passes all the build platforms and scenarios in Sai, now over 500
> builds on 27 platforms.  That covers most common toolchains, but
> judging from the -Wconversion changes, there will be a handful of less
> common toolchains that find new things to complain about and need
> fixing up.
> -Andy
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list