Fix some of the issues reported by LLVM/clang's scan-build
Corresponding to flashrom svn r722.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
This commit fixes only some of the issues, those that were
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/sst28sf040.c b/sst28sf040.c
index d3d7bdb..930ad5b 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -30,28 +30,24 @@
static void protect_28sf040(chipaddr bios)
{
- uint8_t tmp;
-
- tmp = chip_readb(bios + 0x1823);
- tmp = chip_readb(bios + 0x1820);
- tmp = chip_readb(bios + 0x1822);
- tmp = chip_readb(bios + 0x0418);
- tmp = chip_readb(bios + 0x041B);
- tmp = chip_readb(bios + 0x0419);
- tmp = chip_readb(bios + 0x040A);
+ chip_readb(bios + 0x1823);
+ chip_readb(bios + 0x1820);
+ chip_readb(bios + 0x1822);
+ chip_readb(bios + 0x0418);
+ chip_readb(bios + 0x041B);
+ chip_readb(bios + 0x0419);
+ chip_readb(bios + 0x040A);
}
static void unprotect_28sf040(chipaddr bios)
{
- uint8_t tmp;
-
- tmp = chip_readb(bios + 0x1823);
- tmp = chip_readb(bios + 0x1820);
- tmp = chip_readb(bios + 0x1822);
- tmp = chip_readb(bios + 0x0418);
- tmp = chip_readb(bios + 0x041B);
- tmp = chip_readb(bios + 0x0419);
- tmp = chip_readb(bios + 0x041A);
+ chip_readb(bios + 0x1823);
+ chip_readb(bios + 0x1820);
+ chip_readb(bios + 0x1822);
+ chip_readb(bios + 0x0418);
+ chip_readb(bios + 0x041B);
+ chip_readb(bios + 0x0419);
+ chip_readb(bios + 0x041A);
}
static int erase_sector_28sf040(struct flashchip *flash, unsigned long address, int sector_size)