xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 714] New: warning: comparison between signed and un

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 714] New: warning: comparison between signed and unsigned integer expressions
From: bugzilla-daemon@xxxxxxxxxxx
Date: Wed, 9 Aug 2006 15:57:27 -0700
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=714

           Summary:  warning: comparison between signed and unsigned integer
                    expressions
           Product: Linux XFS
           Version: Current
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: xfsprogs
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: jjones@xxxxxxxxx


When I am using xfsprogs 2,8,10; specifically when I am defining:
xfs_exnt_cpy_t exntCpy; the warning below is triggered:
------------------------------------------------------------------------------
In file included from
/home/jjones/depot/mp/exp-perf/output/mipsel/ulibs/include/xfs/libxfs.h:42,
                 from hw/bcm97038/cesar/mediamanager/MediaFileMgrBcm.cpp:26:
/home/jjones/depot/mp/exp-perf/output/mipsel/ulibs/include/xfs/xfs_ialloc_btree.h:
In function `xfs_inofree_t xfs_inobt_maskn(int, int)':
/home/jjones/depot/mp/exp-perf/output/mipsel/ulibs/include/xfs/xfs_ialloc_btree.h:43:
warning: comparison between signed and unsigned integer expressions
make: ***
[/home/jjones/depot/mp/exp-perf/output/mipsel/build/debug/cesar/hw/bcm97038/cesar/mediamanager/MediaFileMgrBcm.o]
Error 1
jjones@XEONBOX:~/depot/mp/exp-perf/platform$

-----------------------------------------------------------------------

It is caused by the comparision between "n" which is an int and
XFS_INODES_PER_CHUNK which is a define and defaults in this case to a __uint32_t

--------------------------------------------------------

typedef __uint64_t  xfs_inofree_t;
#define XFS_INODES_PER_CHUNK    (NBBY * sizeof(xfs_inofree_t))
#define XFS_INODES_PER_CHUNK_LOG    (XFS_NBBYLOG + 3)
#define XFS_INOBT_ALL_FREE  ((xfs_inofree_t)-1)
 
#define XFS_INOBT_MASKN(i,n)        xfs_inobt_maskn(i,n)
static inline xfs_inofree_t xfs_inobt_maskn(int i, int n)
{
     return (((n) >= XFS_INODES_PER_CHUNK ? \
         (xfs_inofree_t)0 : ((xfs_inofree_t)1 << (n))) - 1) << (i);
}

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 714] New: warning: comparison between signed and unsigned integer expressions, bugzilla-daemon <=