[coreboot-gerrit] Change in coreboot[master]: intelmetool: Comment out unused variable
Patrick Georgi (Code Review)
gerrit at coreboot.org
Thu May 11 16:42:01 CEST 2017
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/19612 )
Change subject: intelmetool: Comment out unused variable
......................................................................
intelmetool: Comment out unused variable
Only commented out code uses the variable `csr`, and GCC complains about
it, when enabling the warning *unused-but-set-variable*.
```
Checking for pciutils and zlib... me.c: In function ‘mei_dump’:
me.c:50:18: warning: variable ‘csr’ set but not used [-Wunused-but-set-variable]
struct mei_csr *csr;
^~~
```
As the code is commented, also comment out the declaration of the variable.
Change-Id: I4ecb2b5e9f32906ccfc8a0628d2e0f2d3ad39a02
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/19612
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi at google.com>
---
M util/intelmetool/me.c
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Georgi: Looks good to me, approved
diff --git a/util/intelmetool/me.c b/util/intelmetool/me.c
index 8c703a3..e9fea6b 100644
--- a/util/intelmetool/me.c
+++ b/util/intelmetool/me.c
@@ -47,14 +47,14 @@
static void mei_dump(void *ptr, int dword, int offset, const char *type)
{
- struct mei_csr *csr;
+ /* struct mei_csr *csr; */
switch (offset) {
case MEI_H_CSR:
case MEI_ME_CSR_HA:
- csr = ptr;
-/* if (!csr) {
+/* csr = ptr;
+ if (!csr) {
printf("%-9s[%02x] : ", type, offset);
printf("ERROR: 0x%08x\n", dword);
break;
--
To view, visit https://review.coreboot.org/19612
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4ecb2b5e9f32906ccfc8a0628d2e0f2d3ad39a02
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
More information about the coreboot-gerrit
mailing list