Blame SOURCES/0072-Remove-a-dead-store.patch

b15ea1
From 025e71fb477bfc227d1ba59b85ee8153703cc4a3 Mon Sep 17 00:00:00 2001
b15ea1
From: Peter Jones <pjones@redhat.com>
b15ea1
Date: Thu, 30 Jan 2020 10:35:35 -0500
b15ea1
Subject: [PATCH 72/86] Remove a dead store.
b15ea1
b15ea1
ccc-analyzer noticed:
b15ea1
b15ea1
Bug Group	Bug Type	File		Function/Method	Line	Path Length
b15ea1
Dead store	Dead increment	linux-nvme.c	parse_nvme	89	1
b15ea1
b15ea1
Which is a "sz += ..." I accidentally left in when I switched all the
b15ea1
file path parsers to just using the string pointer "current" and
b15ea1
subtracting it from "path" at the end.
b15ea1
b15ea1
Signed-off-by: Peter Jones <pjones@redhat.com>
b15ea1
---
b15ea1
 src/linux-nvme.c | 2 --
b15ea1
 1 file changed, 2 deletions(-)
b15ea1
b15ea1
diff --git a/src/linux-nvme.c b/src/linux-nvme.c
b15ea1
index d0941e85e08..33edcd4fc7d 100644
b15ea1
--- a/src/linux-nvme.c
b15ea1
+++ b/src/linux-nvme.c
b15ea1
@@ -61,7 +61,6 @@ parse_nvme(struct device *dev, const char *path, const char *root UNUSED)
b15ea1
 	int32_t tosser0, tosser1, tosser2, ctrl_id, ns_id, partition;
b15ea1
 	uint8_t *filebuf = NULL;
b15ea1
 	int pos0 = -1, pos1 = -1, pos2 = -1;
b15ea1
-	ssize_t sz = 0;
b15ea1
 	struct subdir {
b15ea1
 		const char * const name;
b15ea1
 		const char * const fmt;
b15ea1
@@ -86,7 +85,6 @@ parse_nvme(struct device *dev, const char *path, const char *root UNUSED)
b15ea1
 		      *subdirs[i].pos0, *subdirs[i].pos1);
b15ea1
 		dbgmk("         ", *subdirs[i].pos0, *subdirs[i].pos1);
b15ea1
 		if (*subdirs[i].pos0 >= 0 && *subdirs[i].pos1 >= *subdirs[i].pos0) {
b15ea1
-			sz += *subdirs[i].pos1;
b15ea1
 			current += *subdirs[i].pos1;
b15ea1
 			break;
b15ea1
 		}
b15ea1
-- 
b15ea1
2.24.1
b15ea1