Skip to contentSkip to conversation

dev-prajnoha-selout - coverity: ignore ret val

PATCH Peter Rajnoha 1 participant 1 message May 9, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bcd6deea18673cedfa833fc40399949955e7f834
Commit:        bcd6deea18673cedfa833fc40399949955e7f834
Parent:        d11617864a6434c3775e1fbc8c55af6d3ae5dc57
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed May 7 11:22:14 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed May 7 14:17:12 2014 +0200

coverity: ignore ret val

Since we intentionaly do not want to check them,
cast result values to void.

---
 lib/device/dev-type.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
lib/device/dev-type.c +4 -3
index 193e9bd..9d610d4 100644
@@ -495,9 +495,10 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
 	offset_value = strtoll(offset, NULL, 10);
 
 	if (!usage)
-		blkid_probe_lookup_value(probe, "USAGE", &usage, NULL);
-	blkid_probe_lookup_value(probe, "LABEL", &label, NULL);
-	blkid_probe_lookup_value(probe, "UUID", &uuid, NULL);
+		(void) blkid_probe_lookup_value(probe, "USAGE", &usage, NULL);
+	(void) blkid_probe_lookup_value(probe, "LABEL", &label, NULL);
+	(void) blkid_probe_lookup_value(probe, "UUID", &uuid, NULL);
+	/* Return values ignored here, in the worst case we print NULL */
 
 	log_verbose("Found existing signature on %s at offset %s: LABEL=\"%s\" "
 		    "UUID=\"%s\" TYPE=\"%s\" USAGE=\"%s\"",