Add dummy uses for unused variables to clear compilation warnings
[yaffs2.git] / yaffs_guts.c
index ff6e9932a769f94185b20b799125b2ebe03bf8f1..fd3d636d8f48e6f432efe2ffb43a8f92234286fa 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 const char *yaffs_guts_c_version =
-    "$Id: yaffs_guts.c,v 1.111 2010-03-02 02:29:21 charles Exp $";
+    "$Id: yaffs_guts.c,v 1.113 2010-03-05 02:26:27 charles Exp $";
 
 #include "yportenv.h"
 #include "yaffs_trace.h"
@@ -404,16 +404,19 @@ static int yaffs_CountChunkBits(yaffs_Device *dev, int blk)
 
 static int yaffs_SkipVerification(yaffs_Device *dev)
 {
+       dev=dev;
        return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY | YAFFS_TRACE_VERIFY_FULL));
 }
 
 static int yaffs_SkipFullVerification(yaffs_Device *dev)
 {
+       dev=dev;
        return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY_FULL));
 }
 
 static int yaffs_SkipNANDVerification(yaffs_Device *dev)
 {
+       dev=dev;
        return !(yaffs_traceMask & (YAFFS_TRACE_VERIFY_NAND));
 }
 
@@ -1094,11 +1097,18 @@ static void yaffs_HandleWriteChunkOk(yaffs_Device *dev, int chunkInNAND,
                                const __u8 *data,
                                const yaffs_ExtendedTags *tags)
 {
+       dev=dev;
+       chunkInNAND=chunkInNAND;
+       data=data;
+       tags=tags;
 }
 
 static void yaffs_HandleUpdateChunk(yaffs_Device *dev, int chunkInNAND,
                                const yaffs_ExtendedTags *tags)
 {
+       dev=dev;
+       chunkInNAND=chunkInNAND;
+       tags=tags;
 }
 
 void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi)
@@ -1446,6 +1456,8 @@ static yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device *dev,
        int requiredTallness;
        int level = fStruct->topLevel;
 
+       dev=dev;
+
        /* Check sane level and chunk Id */
        if (level < 0 || level > YAFFS_TNODES_MAX_LEVEL)
                return NULL;
@@ -4315,7 +4327,6 @@ static void yaffs_DeviceToCheckpointDevice(yaffs_CheckpointDevice *cp,
        cp->nUnlinkedFiles = dev->nUnlinkedFiles;
        cp->nBackgroundDeletions = dev->nBackgroundDeletions;
        cp->sequenceNumber = dev->sequenceNumber;
-       cp->oldestDirtySequence = dev->oldestDirtySequence;
 
 }
 
@@ -4331,7 +4342,6 @@ static void yaffs_CheckpointDeviceToDevice(yaffs_Device *dev,
        dev->nUnlinkedFiles = cp->nUnlinkedFiles;
        dev->nBackgroundDeletions = cp->nBackgroundDeletions;
        dev->sequenceNumber = cp->sequenceNumber;
-       dev->oldestDirtySequence = cp->oldestDirtySequence;
 }
 
 
@@ -5207,7 +5217,6 @@ int yaffs_ResizeFile(yaffs_Object *in, loff_t newSize)
                in->variant.fileVariant.fileSize = newSize;
        }
 
-
        /* Write a new object header to reflect the resize.
         * show we've shrunk the file, if need be
         * Do this only if the file is not in the deleted directories
@@ -7603,6 +7612,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
        dev->nErasedBlocks = 0;
        dev->isDoingGC = 0;
        dev->hasPendingPrioritisedGCs = 1; /* Assume the worst for now, will get fixed on first GC */
+       dev->oldestDirtySequence = 0;
 
        /* Initialise temporary buffers and caches. */
        if (!yaffs_InitialiseTempBuffers(dev))
@@ -7685,7 +7695,6 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
                                dev->nDeletedFiles = 0;
                                dev->nUnlinkedFiles = 0;
                                dev->nBackgroundDeletions = 0;
-                               dev->oldestDirtySequence = 0;
 
                                if (!init_failed && !yaffs_InitialiseBlocks(dev))
                                        init_failed = 1;