[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-devel
Subject:    Re: [PATCH gpgme] Fix error handling in _gpgme_parse_status().
From:       Werner Koch <wk () gnupg ! org>
Date:       2012-11-15 20:52:44
Message-ID: 87wqxma8rn.fsf () vigenere ! g10code ! de
[Download RAW message or body]

On Thu, 15 Nov 2012 19:20, xi.wang@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.

Thanks,

  Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic