From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: warning compiling dbusbind.c Date: Thu, 24 Jan 2008 21:05:42 +0100 Message-ID: <87prvr7zvt.fsf@gmx.de> References: <5btzl3f2xh.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201204924 6000 80.91.229.12 (24 Jan 2008 20:02:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 20:02:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 24 21:02:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JI8H7-0005oe-V5 for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 21:02:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI8Gh-0001GG-W9 for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 15:01:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI8Ge-0001FA-Gc for emacs-devel@gnu.org; Thu, 24 Jan 2008 15:01:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI8Gc-0001D9-VF for emacs-devel@gnu.org; Thu, 24 Jan 2008 15:01:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI8Gc-0001Cx-RQ for emacs-devel@gnu.org; Thu, 24 Jan 2008 15:01:42 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JI8Gc-0000lQ-4h for emacs-devel@gnu.org; Thu, 24 Jan 2008 15:01:42 -0500 Original-Received: (qmail invoked by alias); 24 Jan 2008 20:01:40 -0000 Original-Received: from p57A241CE.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.65.206] by mail.gmx.net (mp057) with SMTP; 24 Jan 2008 21:01:40 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX195s7M601F5G6xQ6SoPt2nXG2eW4aaF9TKaC+l+dr RsFGW/AMkFRWZ4 In-Reply-To: <5btzl3f2xh.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 24 Jan 2008 14:18:02 -0500") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87451 Archived-At: Glenn Morris 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.