Skip to contentSkip to conversation

XFS compilation warning in 2.6.9-rc1

DISCUSSION Andrew Clayton 2 participants 3 messages Aug 24, 2004 XFS filesystem

lore
Share & tools
lore
#0 lore raw

Hi,

Just got the following warning when compiling a 2.6.9-rc1, this is using gcc version:

	gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)

from Fedora Core 2.

CC fs/xfs/xfs_bmap.o
fs/xfs/xfs_bmap.c: In function `xfs_bmap_do_search_extents':
fs/xfs/xfs_bmap.c:3434: warning: integer constant is too large for "long" type
fs/xfs/xfs_bmap.c:3435: warning: integer constant is too large for "long" type
CC fs/xfs/xfs_bmap_btree.o

Cheers,

Andrew Clayton

#1 lore raw
Quoted 7 lines · Andrew Clayton

CC fs/xfs/xfs_bmap.o
fs/xfs/xfs_bmap.c: In function `xfs_bmap_do_search_extents':
fs/xfs/xfs_bmap.c:3434: warning: integer constant is too large for "long" type
fs/xfs/xfs_bmap.c:3435: warning: integer constant is too large for "long" type
CC fs/xfs/xfs_bmap_btree.o

fs/xfs/xfs_bmap.c +8 -7
@@ -3431,15 +3431,16 @@
 	* uninitialized br_startblock field.
 	*/
 
-        got.br_startoff = 0xffa5a5a5a5a5a5a5;
-        got.br_blockcount = 0xa55a5a5a5a5a5a5a;
+        got.br_startoff = 0xffa5a5a5a5a5a5a5LL;
+        got.br_blockcount = 0xa55a5a5a5a5a5a5aLL;
         got.br_state = XFS_EXT_INVALID;
 
-	#if XFS_BIG_BLKNOS
-        	got.br_startblock = 0xffffa5a5a5a5a5a5;
-	#else
-		got.br_startblock = 0xffffa5a5;
-	#endif
+#if XFS_BIG_BLKNOS
+	got.br_startblock = 0xffffa5a5a5a5a5a5LL;
+#else
+	got.br_startblock = 0xffffa5a5;
+#endif
+
 	if (lastx != NULLEXTNUM && lastx < nextents)
 		ep = base + lastx;
 	else
#2 lore raw
Quoted 17 lines · Christoph Hellwig
fs/xfs/xfs_bmap.c +2 -6
@@ -3431,15 +3431,16 @@
 	* uninitialized br_startblock field.
 	*/
 
-        got.br_startoff = 0xffa5a5a5a5a5a5a5;
-        got.br_blockcount = 0xa55a5a5a5a5a5a5a;
+        got.br_startoff = 0xffa5a5a5a5a5a5a5LL;
+        got.br_blockcount = 0xa55a5a5a5a5a5a5aLL;
         got.br_state = XFS_EXT_INVALID;
 
-	#if XFS_BIG_BLKNOS
-        	got.br_startblock = 0xffffa5a5a5a5a5a5;
-	#else
-		got.br_startblock = 0xffffa5a5;

fs/xfs/xfs_bmap.c line 3446

Quoted 10 lines
fs/xfs/xfs_bmap.c +6 -1
-	#endif
+#if XFS_BIG_BLKNOS
+	got.br_startblock = 0xffffa5a5a5a5a5a5LL;
+#else
+	got.br_startblock = 0xffffa5a5;
+#endif
+
 	if (lastx != NULLEXTNUM && lastx < nextents)
 		ep = base + lastx;
 	else

Yep, that sorted it.

Cheers,