Re: linux-next: build warning after merge of the block tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017.05.10 at 11:24 +1000, Stephen Rothwell wrote:
> Hi Jens,
> 
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> block/elevator.c: In function 'elv_iosched_store':
> block/elevator.c:1102:2: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result [-Wunused-result]
>   strstrip(elevator_name);
>   ^
> 
> Introduced by commit
> 
>   d0f6e2da5871 ("block: Remove leading whitespace and trailing newline in elevator switch error message")

Yes, it was missing a (void) like "(void)strlcpy(...)". But Jens
unfortunately removed both warnings, so the following patch should now
be enough:

diff --git a/block/elevator.c b/block/elevator.c
index fda6be933130..dd0ed19e4fb7 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -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;
 
-- 
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux