mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix dead variable assignment, spotted by clang analyzer
Fix clang warnings:
../kernel/dict.c:289:2: warning: Value stored to 'len' is never read
len -= sizeof(dictionary_header_t);
../packages/cmdline.c:181:8: warning: Value stored to 'buf' during its
initialization is never read
char *buf = ci->buf;
../libopenbios/elf_info.c:126:2: warning: Value stored to 'name' is never read
name = addr;
../libopenbios/elf_load.c:277:5: warning: Value stored to 'addr' is never read
addr += pad;
../drivers/ide.c:209:3: warning: Value stored to 'err' is never read
err = ob_ide_pio_readb(drive, IDEREG_ERROR);
../drivers/ide.c:219:17: warning: Value stored to 'old_cdb' during its initialization is never read
unsigned char old_cdb = cmd->cdb[0];
../drivers/ide.c:222:4: warning: Value stored to 'old_cdb' is never read
old_cdb = cmd->old_cdb;
../drivers/pci.c:103:2: warning: Value stored to 'ss' is never read
ss = 0;
../drivers/pci.c:100:2: warning: Value stored to 'dev' is never read
dev = 0;
../drivers/pci.c:212:2: warning: Value stored to 'bus' is never read
bus = (hi >> 16) & 0xFF;
../drivers/pci.c:953:4: warning: Value stored to 'rev' is never read
rev = pci_config_read8(addr, PCI_REVISION_ID);
../packages/video.c:331:2: warning: Value stored to 's' is never read
s = video.fb.mphys - s;
../packages/video.c:330:2: warning: Value stored to 'size' is never read
size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;
../fs/hfsplus/btree.c:229:5: warning: Value stored to 'p' is never read
p = btree_readhead(&bt->head, p);
../fs/hfsplus/volume.c:149:2: warning: Value stored to 'p' is never read
p = volume_readfork(p, &vh->start_file );
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@751 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -226,7 +226,7 @@ static int btree_init(btree* bt, volume* vol, hfsp_fork_raw* fork)
|
||||
p = btree_readnode(&node, p);
|
||||
if (node.kind != HFSP_NODE_HEAD)
|
||||
return -1; // should not happen ?
|
||||
p = btree_readhead(&bt->head, p);
|
||||
btree_readhead(&bt->head, p);
|
||||
|
||||
node_size = bt->head.node_size;
|
||||
bt->blkpernode = node_size / vol->blksize;
|
||||
|
||||
@@ -146,7 +146,7 @@ volume_readbuf(hfsp_vh* vh, char * p)
|
||||
p = volume_readfork(p, &vh->ext_file );
|
||||
p = volume_readfork(p, &vh->cat_file );
|
||||
p = volume_readfork(p, &vh->attr_file );
|
||||
p = volume_readfork(p, &vh->start_file );
|
||||
volume_readfork(p, &vh->start_file );
|
||||
return 0;
|
||||
fail:
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user