[Geany-devel] --readonly handling
lists.ban at xxxxx
Mon Nov 21 15:19:45 UTC 2011
Le 21/11/2011 15:49, Colomban Wendling a écrit :
> Le 18/11/2011 18:44, Dimitar Zhekov a écrit :
>> BTW, -Wmissing-field-initializers displays a huge number of warnings in
>> highlightingmappings.h (fill_eol and merge), and no warnings in any
>> other source file (except def_clo above).
> I know it, and the "missing" initializer are expected to be missing.
> Actually -Wmissing-field-initializers warns about fields implicitly
> initialized to 0, which is not a real problem but that "often" is
> unwanted. Here it's wanted not to clutter the initializer lists with
> plenty of zeros, and there is even a note on the top of the file.
> However, if it's a problem for many readers, we could imagine adding a
> plenty of 0/FALSE everywhere, though I don't think it's necessary.
> Actually the better would be to have a portable way to disable this
> warning only for this particular file, but I'm not sure it's easy?
I just fixed this by using GCC's "diagnostic" pragma in
highlightingmappings.h . Tested and works with GCC and CLang, and it
should do nothing on non-GCC-style compilers.
More information about the Devel