[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning compiling dbusbind.c
From: |
Michael Albinus |
Subject: |
Re: warning compiling dbusbind.c |
Date: |
Thu, 24 Jan 2008 21:05:42 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Glenn Morris <address@hidden> writes:
> I receive this warning compiling dbusbind.c on x86_64 GNU/Linux with
> gcc 4.1:
>
> dbusbind.c: In function 'xd_retrieve_arg':
> dbusbind.c:600: warning: comparison is always false due to limited
> range of data type
The code in question is
dbus_uint32_t val;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, val);
return make_fixnum_or_float (val);
I've used make_fixnum_or_float, because BITS_PER_EMACS_INT is too small
on 32bit machines. One possible solution could be
dbus_uint32_t val;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, val);
#if BITS_PER_EMACS_INT >= 32
return make_number (val);
#else
return make_fixnum_or_float (val);
#endif
On the other hand, shouldn't it be handled in make_fixnum_or_float?
Best regards, Michael.