[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning compiling dbusbind.c
From: |
Stefan Monnier |
Subject: |
Re: warning compiling dbusbind.c |
Date: |
Thu, 24 Jan 2008 21:19:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>> > Yuck. I must prefer living with the warning (which is just that:
>> > a warning. We already have several similar ones).
>>
>> I menioned this because it is the only warning of any kind I get when
>> compiling the Emacs C code.
> Indeed, in GDB all files are compiled with the -Werror option, presumably
> because GCC folks are more knowledgeable about what is undesirable than the
> average developer.
But uglifying the code and making it less maintainable just to get rid
of a minor warning is not good software engineering practices.
I'd much rather introduce a dummy macro like
#define DEFEAT_WARNING(x) ((EMACS_INT)(x))
or even
#define DEFEAT_WARNING(x) ((((EMACS_INT)(x))+1)-1)
then introduce the "#if BITS_PER_EMACS_INT >= 32" that dispatches to two
different macros, where the reason why it's correct is not nearly
as obvious.
Stefan