[PATCH gpgme] Fix error handling in _gpgme_parse_status().

Werner Koch wk at gnupg.org
Thu Nov 15 21:52:44 CET 2012

On Thu, 15 Nov 2012 19:20, xi.wang at gmail.com said:

> The storage of an enum is compatible with int, but the signedness is
> very tricky.

Now I see what you are meaning.  The test is optimized out.  I am used
to see something like

  warning: comparison of unsigned expression >= 0 is always true

in such cases but that does not happen with GPGME.  The reason is that,
for unknown reasons, GPGME does not test for gcc flags in configure and
uses way too less warning switches.  This definitely needs to be fixed.

> It's better to fix this by changing the return type to signed int, or

Right that is how I would have solved this too.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-devel mailing list