Skip to contentSkip to conversation

elevator: eliminate unused result build warning

PATCH In review Firo Yang 2 participants 2 messages May 10, 2017

Subsystems (2)
lore
Share & tools
lore

Firo Yang

author
#0 lore raw

PATCH 1/1 elevator: eliminate unused result build warning

Gcc complains about ignoring return value of ‘strstrip’; Fix it by just using the strstrip() as the function parameter.

---
 block/elevator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
block/elevator.c +1 -2
index fda6be9..dd0ed19 100644
@@ -1099,8 +1099,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
 		return count;
 
 	strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
-	strstrip(elevator_name);
-	ret = __elevator_change(q, elevator_name);
+	ret = __elevator_change(q, strstrip(elevator_name));
 	if (!ret)
 		return count;
 
Signature · 1 line
2.9.3
maintainer
#1 lore raw
Quoted 2 lines · Firo Yang

Gcc complains about ignoring return value of ‘strstrip’; Fix it by just using the strstrip() as the function parameter.

This has already been fixed up.

Signature · 1 line
Jens Axboe