[freenos] [freenos commit] r226 - Fix compilation on 32-bit host systems: explicit cast to ulong for %lu formats.

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Fri, 10 Jul 2009 17:01:32 +0000

Author: nieklinnenbank
Date: Fri Jul 10 10:00:26 2009
New Revision: 226

Modified:
   trunk/srv/filesystem/linn/LinnCreate.h
   trunk/srv/filesystem/linn/LinnDump.cpp

Log:
Fix compilation on 32-bit host systems: explicit cast to ulong for %lu formats.


Modified: trunk/srv/filesystem/linn/LinnCreate.h
==============================================================================
--- trunk/srv/filesystem/linn/LinnCreate.h      (original)
+++ trunk/srv/filesystem/linn/LinnCreate.h      Fri Jul 10 10:00:26 2009
@@ -57,7 +57,7 @@
         if ((sb)->freeBlocksCount < (count)) \
        { \
            printf("%s: not enough free blocks remaining (%lu needed)\n", \
-                   prog, (count)); \
+                   prog, (ulong)(count)); \
            exit(EXIT_FAILURE); \
        } \
        (sb)->freeBlocksCount -= (count); \

Modified: trunk/srv/filesystem/linn/LinnDump.cpp
==============================================================================
--- trunk/srv/filesystem/linn/LinnDump.cpp      (original)
+++ trunk/srv/filesystem/linn/LinnDump.cpp      Fri Jul 10 10:00:26 2009
@@ -199,11 +199,11 @@
                group.freeBlocksCount,
                group.freeInodesCount,
                group.blockMap,
-               group.blockMap + LINN_GROUP_NUM_BLOCKMAP(&super),
+               (ulong) group.blockMap + LINN_GROUP_NUM_BLOCKMAP(&super),
                group.inodeMap,
-               group.inodeMap + LINN_GROUP_NUM_INODEMAP(&super),
+               (ulong) group.inodeMap + LINN_GROUP_NUM_INODEMAP(&super),
                group.inodeTable,
-               group.inodeTable + LINN_GROUP_NUM_INODETAB(&super));
+               (ulong) group.inodeTable + LINN_GROUP_NUM_INODETAB(&super));
     }
     /* Cleanup and terminate. */
     fclose(fp);

Other related posts:

  • » [freenos] [freenos commit] r226 - Fix compilation on 32-bit host systems: explicit cast to ulong for %lu formats. - codesite-noreply