From eaa174b687c7f1775d1ab1f83eab8e8b28b73c35 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sun, 7 May 2017 08:57:53 +0200 Subject: [PATCH] UPSTREAM: 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. BUG=none BRANCH=none TEST=none Change-Id: Id62ca6b6cacff775c2405993e7f7468b1abaa9f7 Signed-off-by: Patrick Georgi Original-Commit-Id: 90d41779d1c4cd64a83ec9a80256988b93ec8d08 Original-Change-Id: I4ecb2b5e9f32906ccfc8a0628d2e0f2d3ad39a02 Original-Signed-off-by: Paul Menzel Original-Reviewed-on: https://review.coreboot.org/19612 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Patrick Georgi Reviewed-on: https://chromium-review.googlesource.com/506179 Commit-Ready: Patrick Georgi Tested-by: Patrick Georgi Reviewed-by: Patrick Georgi --- util/intelmetool/me.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/intelmetool/me.c b/util/intelmetool/me.c index 8c703a3465..e9fea6bc1c 100644 --- a/util/intelmetool/me.c +++ b/util/intelmetool/me.c @@ -47,14 +47,14 @@ static uint8_t* mei_mmap; 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;