[Geany] [PATCH] Fixes for warnings and portability
Nick Treleaven
nick.treleaven at xxxxx
Tue Feb 19 14:14:39 UTC 2008
On Sun, 17 Feb 2008 00:43:56 -0500
"Daniel Richard G." <skunk at iSKUNK.ORG> wrote:
> I normally build software with many warnings turned on, and also
> frequently build on non-Linux Unix platforms. In the course of doing
> both with Geany, I came across many warnings and portability issues
> that the attached patch seeks to address.
As Enrico said, thanks :)
BTW do you use any special warnings for gcc that can reveal these
things?
[...]
> * highlighting.c: Bitfields in structs should properly have a full
> integer type.
>
> * highlighting.c: Declaring these HighlightingStyle structures as
> "static" gets rid of "initializer element is not computable at load
> time" when they are used in the subsequent entries[] array.
I'll try to keep these in mind next time.
[...]
> * highlighting.h: The "gboolean" type already indicates that these
> fields are true-false flags, and GCC complains about portability if a
> bitfield specifier is used.
OK, maybe I'll change them to integer types so they can share a DWord
with bitfields.
> * prefs.c: No comma after that last entry.
Oops, I recently started doing that to avoid the extra comma change in
diffs when appending items. Ah well, another thing to leave out until
I'm D programming.
Regards,
Nick
More information about the Users
mailing list