[sword-devel] Patches to fix compiler warnings
Jaak Ristioja
jaak at ristioja.ee
Thu Dec 20 23:18:08 MST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As Troy mentioned in an earlier post (and also pointed out to me in
private), the Sword team doesn't count all such warnings as errors. It
is true that most of them are not strictly errors but related to safe
programming style.
However, there are other projects using Swords code (especially the
headers) which have different views and policies about handling
warnings and might specify different -W<warning-type> flags to the
compiler than Sword does.
In BibleTime we've had this problem more than once, that we'd like to
eliminate more compiler warnings, but when we've turned these warnings
on, searching for deficiencies in our code is like finding needles in
the haystack of all the warnings output by Sword headers.
As for finding these errors, I used -Wall Wextra, which I think all
developers should use at least from time to time. The reason is
simple: among these style errors you WILL find real bugs. So did I. So
I still suggest fixing all those non-real-bug warnings so that finding
bugs in the future would not be like searching for needles in a
haystack. It's a little thing, but in the long run it helps the
developer develop much better quality code.
Thanks and blessings,
Jaak
On 21.12.2012 01:32, Jaak Ristioja wrote:
> Hello!
>
> Please apply these patches (bzip2-ed to workaround sword-devel 90
> KB message size limit and attached) to fix about 3000 compiler
> warnings with GCC and Clang.
>
> The patches should apply to
> https://crosswire.org/svn/sword/trunk@2751
>
> Blessings, Jaak
>
>
> PS: Here are the sha1sums:
>
> 7ba3a0b954b8b545d407eb0f46821e4ebdb1c3bf
> sword-Wempty-body-fix.diff.bz2
> e47776b086c1d8f686a09114bd162358db18a062
> sword-Wmissing-field-initializers-fix.diff.bz2
> fc68490a4aac0b8954fa02f0832fdccf95573fd7
> sword-Wtype-limits-fix.diff.bz2
> eb2749fe94fcb8018be61c8925a12b2503460ac0
> sword-Wunused-parameter-fix.diff.bz2
> 004fbd6ac5bf6107cf37beb4b436f34400ec2774
> sword-comparison-not-assignment-fix.diff.bz2
> df8231f927ae1c34160b57d7b2a90e58a686448f
> sword-illegal-source-file-encoding.diff.bz2
>
>
>
> _______________________________________________ sword-devel mailing
> list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel Instructions
> to unsub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