From: Johannes Schindelin Date: Thu, 22 Jan 2015 21:20:01 GMT Subject: Re: Git compile warnings (under mac/clang) Message-ID: In-Reply-To: Hi Stefan, On 2015-01-22 20:59, Stefan Beller wrote: > cc Johannes Schindelin who is working in > the fsck at the moment > > On Thu, Jan 22, 2015 at 11:43 AM, Michael Blume wrote: > >> CC fsck.o >> fsck.c:110:38: warning: comparison of unsigned enum expression >= 0 is >> always true [-Wtautological-compare] >> if (options->msg_severity && msg_id >= 0 && msg_id < FSCK_MSG_MAX) >> ~~~~~~ ^ ~ According to A2.5.4 of The C Programming Language 2nd edition: Identifiers declared as enumerators (see Par.A.8.4) are constants of type int. Therefore, the warning is incorrect: any assumption about enum fsck_msg_id to be unsigned is false. Ciao, Johannes