lkml.org 
[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Drbd-dev] [PATCH 13/13] DRBD: Fix comparison always false warning due to long/long long compare
Date
Am Mittwoch, 12. Oktober 2011, 15:35:28 schrieb Geert Uytterhoeven:
> On Wed, Oct 12, 2011 at 14:27, Philipp Reisner
>
> <philipp.reisner@linbit.com> wrote:
> > From: David Howells <dhowells@redhat.com>
> >
> > Fix warnings of the following nature in the drbd header:
> >
> > In file included from drivers/block/drbd/drbd_bitmap.c:32:
> > drivers/block/drbd/drbd_int.h: In function 'drbd_get_syncer_progress':
> > drivers/block/drbd/drbd_int.h:2234: warning: comparison is always false
> > due to limited range of data
> >
> > where mdev->rs_total (an unsigned long) is being compared to 1ULL << 32,
> > which is always false on a 32-bit machine.
>
> But on 32-bit, unsigned long is never larger than UINT_MAX neither, so
> it doesn't
> really change anything??
>

Hi Geert,

As the commit message says, David's intention was to silence a compiler
warning, not to change anything.

Best,
Phil
--
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.


\
 
 \ /
  Last update: 2011-10-13 10:29    [W:0.082 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site