[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings about error_t in glibc on GNU/Hurd
From: |
Thomas Schwinge |
Subject: |
Re: Warnings about error_t in glibc on GNU/Hurd |
Date: |
Thu, 29 Aug 2013 12:30:55 +0200 |
User-agent: |
Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) |
Hi!
On Wed, 29 May 2013 15:53:24 -0700 (PDT), Roland McGrath <roland@hack.frob.com>
wrote:
> > + /* Avoid warning: case value '0' not in enumerated type 'error_t'. */
> > + ESUCCESS = 0,
>
> I don't think this is the right comment. If anybody reads this comment at
> all, that doesn't tell them much. Perhaps something like:
>
> /* The value zero always means success and it is perfectly fine for
> code to use 0 explicitly (or implicitly, e.g. via Boolean coercion).
> Having an enum entry for zero both makes the debugger print the name
> for error_t-typed zero values, and prevents the compiler from issuing
> warnings about 'case 0:' in a switch on an error_t-typed value. */
Thanks; pushed as commit 883359805325a82f4f291ff85624f141f6c93636 using
your above words.
Grüße,
Thomas
pgpee2_ozwk3A.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Warnings about error_t in glibc on GNU/Hurd,
Thomas Schwinge <=