On Mon, Aug 31, 2020 at 09:02:22PM +0200, Thibaut Cuvelier wrote:

> > Thibaut, I'm not sure what compiler you're using, but is there an analog
> > of "-Werror" (used on GCC and Clang) for it that you can enable? I
> > compile with it and compilation on your branch stopped because of an
> > error (converted from a warning) of something like "unused argument".
> >
> > A lot of warnings are harmless, but we make a big effort even on master
> > to keep warnings clean and not introduce new code that triggers
> > warnings. That way when there is a warning that actually ends up being a
> > non-trivial problem, it is easy to spot it immediately. Also, it makes
> > it easier to review proposed code changes when there are no warnings.
> >
> 
> It's already enabled through CMake, I suppose, as I sometimes have
> compilation halted due to a variable being unused.

What flag do you use with CMake? And what is your compiler? I would not
be surprised if the CMake flag only works for GCC and Clang, but I also
wouldn't be surprised to be wrong.

> I try to reduce the
> amount of warnings in the code I write and in the surroundings already :).

Thanks for doing that!

> The major annoyance is that different compilers will yell at different
> things… and their flags do not always enable the same warnings.

Indeed, it is tricky. Even different versions of the same compiler have
very different behavior. For example, the new Clang release brought a
lot of warnings (which were helpful to have fixed, in my opinion). I am
sure in the past I made commits that broke something on Windows and in
general I think everyone understand that it goes both ways. All we can
do is try our best and do what is under our control.

> As it's quite complicated to get all the dependencies for a given compiler,
> it would literally take me hours to get another compiler working with LyX…
> It would probably be easier to have a Linux virtual machine just to test
> for warnings.

I don't think you need to set up the virtual machine just for this.
However, I would be surprised if there's not a way to configure your
compiler to be more strict. I imagine there are extra flags for your
compiler that catch more warnings. The next time I find a warning I will
let you know and we can try to figure out whether there is a way to
enable an extra flag on your compiler that catches it. Thanks for your
patience and time and willingness to adapt your workflow.

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to