lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH,RFC] ext3: Add support for non-native signed/unsigned htree hash algorithms
On Wed, Oct 22, 2008 at 05:22:21PM -0700, Andrew Morton wrote:
> > + if (((int) c) == -1) {
>
> arm says
>
> fs/ext3/super.c: In function `ext3_fill_super':
> fs/ext3/super.c:1750: warning: comparison is always false due to limited range of data type
>
> Also, is there any way in which this new code can be, umm, cleaned up?

Hmm..... is it considered safe to depend on the userspace limits.h
header file? I guess if we trust that header file to be correct we
could check the value of CHAR_MIN and/or CHAR_MAX as defined by
limits.h.

Alternatively we could do an #ifdef __CHAR_UNSIGNED__, which is
defined by gcc. The manual for gcc tells us not to depend on it, but
to depend on limits.h instead.

Any thoughts, or comments? Does anyone know if the Intel compiler
will DTRT with either of these approaches?

- Ted


\
 
 \ /
  Last update: 2008-10-23 04:59    [W:0.093 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site