[sword-devel] Patches to fix compiler warnings
Jaak Ristioja
jaak at ristioja.ee
Thu Jan 3 14:11:28 MST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02.01.2013 09:22, Nic Carter wrote:
> Thanks for these.
>
> Hopefully some kind soul will apply them?
When I first posted the patches I thought I'll wait until 2013 before
taking any further steps. But it has been a very busy time for me and
possibly also for the Sword developers, so I think I'll wait a little
more until I have more time to work on Sword (maybe some time next week).
> For those who are interested, some fun articles related to this
> stuff:
>
> *
> http://inessential.com/2012/12/31/coders_in_the_hands_of_an_angry_god
>
>
* http://boredzo.org/blog/archives/2009-11-07/warnings
> * (more appropriate to Obj-C)
> http://ashfurrow.com/blog/seven-deadly-sins-of-modern-objective-c
I can't fully agree with the "treat all warnings as errors" approach,
since as far as I know there are some warnings which are very
difficult to work around, e.g. warnings about "#pragma STDC
FENV_ACCESS ON" not being supported by certain compilers or Clang
warnings about struct/class padding. Some warnings can be annotated
with comments (which might also show up in the warnings) so that
developers wouldn't try to fix what can't be fixed in a
straightforward manner.
In my opinion short variable names are also fine if they are either
simple temporary variables, if their declarations are well documented
or if their semantics are obvious just by looking at their type. Of
course longer and more descriptive names are recommended, but in case
stuff doesn't fit well horizontally I've usually abbreviated them,
especially if their scope is limited. The biggest issue with short
variable names is that they sometimes (and not very rarely) make code
difficult to read and understand.
Blessings,
Jaak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQgcBAEBAgAGBQJQ5fP8AAoJEEqsYmEt1rCOAedAAK/zdbAYoBA5aIBq2CtlbCRl
o70jF0ORE1u/aVMtZ9tsfipbknYKupVOYWEwBJ8ZpO20fSUag4NYrmySThD4LvY9
1sVex6LEckT9lsMVEnNNOGw6b5nJ0JyPIuCYG1cxsFg/pprsgFY26eZZiIHNj1zQ
6/KVgkjG95QNncPRcY4hAjvAOgYru84AQroz0Cy5K/GJBMxitDVfoTLH9+dmLt7T
+0Ovg8X+/1vnO11PYxtHLXSL05kN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