fs/yaffs2/yaffs_guts.c: Fix some GCC 4.6 warnings
Fix:
yaffs_guts.c: In function 'yaffs_CheckChunkErased':
yaffs_guts.c:854:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_UpdateObjectHeader':
yaffs_guts.c:3463:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_GrabChunkCache':
yaffs_guts.c:3774:6: warning: variable 'pushout' set but not used
yaffs_guts.c: In function 'yaffs_Scan':
yaffs_guts.c:5237:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_CheckObjectDetailsLoaded':
yaffs_guts.c:5748:6: warning: variable 'alloc_failed' set but not used
yaffs_guts.c:5747:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_ScanBackwards':
yaffs_guts.c:5808:6: warning: variable 'deleted' set but not used
yaffs_guts.c:5806:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_GetObjectName':
yaffs_guts.c:6657:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index c4329af..f0ef8db 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -851,9 +851,8 @@
int retval = YAFFS_OK;
__u8 *data = yaffs_GetTempBuffer(dev, __LINE__);
yaffs_ExtendedTags tags;
- int result;
- result = yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, &tags);
+ yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, &tags);
if(tags.eccResult > YAFFS_ECC_RESULT_NO_ERROR)
retval = YAFFS_FAIL;
@@ -3460,7 +3459,6 @@
int prevChunkId;
int retVal = 0;
- int result = 0;
int newChunkId;
yaffs_ExtendedTags newTags;
@@ -3484,7 +3482,7 @@
prevChunkId = in->chunkId;
if (prevChunkId >= 0) {
- result = yaffs_ReadChunkWithTagsFromNAND(dev, prevChunkId,
+ yaffs_ReadChunkWithTagsFromNAND(dev, prevChunkId,
buffer, &oldTags);
yaffs_VerifyObjectHeader(in,oh,&oldTags,0);
@@ -3771,7 +3769,6 @@
yaffs_Object *theObj;
int usage;
int i;
- int pushout;
if (dev->nShortOpCaches > 0) {
/* Try find a non-dirty one... */
@@ -3790,7 +3787,6 @@
theObj = NULL;
usage = -1;
cache = NULL;
- pushout = -1;
for (i = 0; i < dev->nShortOpCaches; i++) {
if (dev->srCache[i].object &&
@@ -3800,7 +3796,6 @@
usage = dev->srCache[i].lastUse;
theObj = dev->srCache[i].object;
cache = &dev->srCache[i];
- pushout = i;
}
}
@@ -5234,7 +5229,6 @@
int startIterator;
int endIterator;
int nBlocksToScan = 0;
- int result;
int chunk;
int c;
@@ -5377,7 +5371,7 @@
/* Read the tags and decide what to do */
chunk = blk * dev->nChunksPerBlock + c;
- result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL,
+ yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL,
&tags);
/* Let's have a good look at this chunk... */
@@ -5474,7 +5468,7 @@
yaffs_SetChunkBit(dev, blk, c);
bi->pagesInUse++;
- result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk,
+ yaffs_ReadChunkWithTagsFromNAND(dev, chunk,
chunkData,
NULL);
@@ -5744,8 +5738,6 @@
yaffs_ObjectHeader *oh;
yaffs_Device *dev = in->myDev;
yaffs_ExtendedTags tags;
- int result;
- int alloc_failed = 0;
if(!in)
return;
@@ -5760,7 +5752,8 @@
in->lazyLoaded = 0;
chunkData = yaffs_GetTempBuffer(dev, __LINE__);
- result = yaffs_ReadChunkWithTagsFromNAND(dev,in->chunkId,chunkData,&tags);
+ yaffs_ReadChunkWithTagsFromNAND(dev, in->chunkId,
+ chunkData, &tags);
oh = (yaffs_ObjectHeader *) chunkData;
in->yst_mode = oh->yst_mode;
@@ -5785,8 +5778,6 @@
if(in->variantType == YAFFS_OBJECT_TYPE_SYMLINK){
in->variant.symLinkVariant.alias =
yaffs_CloneString(oh->alias);
- if(!in->variant.symLinkVariant.alias)
- alloc_failed = 1; /* Not returned to caller */
}
yaffs_ReleaseTempBuffer(dev,chunkData, __LINE__);
@@ -5803,9 +5794,7 @@
int nBlocksToScan = 0;
int chunk;
- int result;
int c;
- int deleted;
yaffs_BlockState state;
yaffs_Object *hardList = NULL;
yaffs_BlockInfo *bi;
@@ -5971,8 +5960,6 @@
state = bi->blockState;
- deleted = 0;
-
/* For each chunk in each block that needs scanning.... */
foundChunksInBlock = 0;
for (c = dev->nChunksPerBlock - 1;
@@ -5985,7 +5972,7 @@
chunk = blk * dev->nChunksPerBlock + c;
- result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL,
+ yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL,
&tags);
/* Let's have a good look at this chunk... */
@@ -6132,7 +6119,7 @@
* living with invalid data until needed.
*/
- result = yaffs_ReadChunkWithTagsFromNAND(dev,
+ yaffs_ReadChunkWithTagsFromNAND(dev,
chunk,
chunkData,
NULL);
@@ -6654,7 +6641,6 @@
}
#endif
else {
- int result;
__u8 *buffer = yaffs_GetTempBuffer(obj->myDev, __LINE__);
yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *) buffer;
@@ -6662,7 +6648,7 @@
memset(buffer, 0, obj->myDev->nDataBytesPerChunk);
if (obj->chunkId >= 0) {
- result = yaffs_ReadChunkWithTagsFromNAND(obj->myDev,
+ yaffs_ReadChunkWithTagsFromNAND(obj->myDev,
obj->chunkId, buffer,
NULL);
}