Date: Mon, 19 Jan 2015 22:51:31 +0100 Address the warning below found by Clang’s static analyzer scan-build 3.6 and remove that assignment.
spi25.c:1163:3: warning: Value stored to 'pos' is never read
pos += pos % 2;
^ ~~~~~~~
1 warning generated.
This was introduced in revision 1211 (Switch all flash chips to partial
write.).
Signed-off-by: Paul Menzel <[email protected]>
---
spi25.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/spi25.c b/spi25.c
index 673bdf5..6c9d0e9 100644
--- a/spi25.c
+++ b/spi25.c
@@ -1157,11 +1157,9 @@ int default_spi_write_aai(struct flashctx *flash, const
uint8_t *buf, unsigned i
}
/* Write remaining byte (if any). */
- if (pos < start + len) {
+ if (pos < start + len)
if (spi_chip_write_1(flash, buf + pos - start, pos, pos % 2))
return SPI_GENERIC_ERROR;
- pos += pos % 2;
- }
return 0;
--
2.1.4
signature.asc
Description: This is a digitally signed message part
_______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
