Nico Huber (nico.huber@secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3299
-gerrit
commit 3eb22deb33318b8f756453288a475323a475c07f Author: Nico Huber nico.huber@secunet.com Date: Sun May 26 15:10:01 2013 +0200
Fix two warnings by removing unused code
Fix these warnings:
fs/fsys_cramfs.c: In function 'cramfs_read': fs/fsys_cramfs.c:206:7: warning: variable 'devread_ret' set but not used [-Wunused-but-set-variable] fs/fsys_cramfs.c: In function 'cramfs_dir': fs/fsys_cramfs.c:295:6: warning: variable 'namelen' set but not used [-Wunused-but-set-variable]
by removing the assignments and one unused call to strlen().
Change-Id: Ia2552b24263675bdef44a8c5fde8f67edf107912 Signed-off-by: Nico Huber nico.huber@secunet.com --- fs/fsys_cramfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/fsys_cramfs.c b/fs/fsys_cramfs.c index d7cb19b..7866cdb 100644 --- a/fs/fsys_cramfs.c +++ b/fs/fsys_cramfs.c @@ -203,7 +203,6 @@ cramfs_read (char *buf, int len) int block_len; int ret = 0; long size = 0; - long devread_ret;
nblocks = (cramfs_buf->inode.size - 1) / CRAMFS_BLOCK + 1; block = filepos / CRAMFS_BLOCK; @@ -226,7 +225,7 @@ cramfs_read (char *buf, int len) len, block, start, block_len); if (cramfs_buf->cached_block != block) { disk_read_func = disk_read_hook; - devread_ret = devread(0, start, block_len, cramfs_buf->data); + devread(0, start, block_len, cramfs_buf->data); disk_read_func = NULL; cramfs_buf->cached_block = block; } else debug_cramfs("%d was cached...", block); @@ -291,8 +290,6 @@ cramfs_dir(char *dirname) u32 dir_size; /* size of this directory */ u32 off; /* offset of this directory */ u32 loc; /* location within a directory */ - - int namelen;
/* loop invariants: current_ino = inode to lookup @@ -425,7 +422,6 @@ cramfs_dir(char *dirname) cramfs_buf->inode.namelen << 2, cramfs_buf->name)) return 0; cramfs_buf->name[cramfs_buf->inode.namelen << 2] = '\0'; - namelen = cramfs_strlen(cramfs_buf->name); /* advance loc prematurely to next on-disk directory entry */ loc += sizeof(struct cramfs_inode) + (cramfs_buf->inode.namelen << 2);