[sword-devel] verseparsing-utf8 (and write error checking)
Jonathan Marsden
jmarsden at fastmail.fm
Sun May 24 14:38:05 MST 2009
Dmitrijs Ledkovs wrote:
>> These are annoying to read, but relatively harmless (unless you do
>> -Werror of course :) . They do mean that the code concerned is not
>> really doing sufficient error checking, which should IMO be fixed; I
>> think I provided some ideas/a patch for at least some of these write()
>> calls earlier.
> So if it fails to write (e.g. out of memory / HDD) then sword will
> still think everything succeeded fine? Seems quite dangerous to me
It's bad coding practice. However, in the world of really huge hard
drives and multiple gigabytes of RAM even on cheap US$300 PCs, very few
people ever fill them up any more (you seem to be an exception to
this!). I suppose someone installing SWORD modules to a USB stick or
other removable memory card might be more likely to run into this.
>> If these tests are supposed to work "out of the tarball" with no SWORD
>> library and locale data yet installed, then they probably need fixing so
>> that they are able to "find" the SWORD locale data inside the
>> tarball/build area??
> Sounds reasonable to me. ...
> Again I'm not a C++ expert so I can only report the bug.
Fair enough. Maybe you can add both this testsuite issue and the
warnings/lack of error checking of the return value from write(2) calls
issue as two new new SWORD bugs, in JIRA, so they don't get forgotten?
Jonathan
More information about the sword-devel
mailing list