all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: warning compiling dbusbind.c
Date: Thu, 24 Jan 2008 21:05:42 +0100	[thread overview]
Message-ID: <87prvr7zvt.fsf@gmx.de> (raw)
In-Reply-To: <5btzl3f2xh.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 24 Jan 2008 14:18:02 -0500")

Glenn Morris <rgm@gnu.org> 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.

  reply	other threads:[~2008-01-24 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24 19:18 warning compiling dbusbind.c Glenn Morris
2008-01-24 20:05 ` Michael Albinus [this message]
2008-01-24 21:25   ` Stefan Monnier
2008-01-24 22:33     ` Glenn Morris
2008-01-24 23:20       ` Nick Roberts
2008-01-25  2:19         ` Stefan Monnier
2008-01-25 19:04       ` Michael Albinus
2008-01-25 22:42         ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87prvr7zvt.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.