emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode build: "comparison is always true" warnings


From: Stefan Monnier
Subject: Re: unicode build: "comparison is always true" warnings
Date: Fri, 23 Nov 2007 10:09:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> I'm working on providing snapshots of the unicode branch and have been
> getting a ton of these messages:

>     warning: comparison is always true due to limited range of data type

> Most are in syntax.c, but one shows up in search.c.

These are difficult to eliminate without making the code uglier.
IIRC the issue is typically that there's are generic macros to handle
characters and they can be used on any character (not just on 8-bit
chars).  But when you use it on a "char", part of the macro becomes
trivially optimizable and gcc thinks this may in fact indicate the
presence of a bug.
Maybe we should just silence these warnings with the
appropriate -Wno-<foobar>.

> There is also a warning from movemail.c:

>     warning: the use of `mktemp' is dangerous, better use `mkstemp' or
>     `mkdtemp'

This one looks bad.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]