From 2b7b78fa5d794d0bd6b0beb2b8b7f98f7b1071f9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 13 Jul 2015 12:59:38 -0700 Subject: [PATCH] Fix switch-bool warning As of gcc version 5.1.1 a new warning has been added to detect the use of a boolean in a switch statement (-Wswitch-bool). Resolve the warning by explicitly casting the value to an integer type. zfs-0.6.4/module/zfs/zvol.c: In function 'zvol_request': error: switch condition has boolean value [-Werror=switch-bool] Signed-off-by: Brian Behlendorf --- module/zfs/zvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 8646892ea826..c9c8d2964933 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -764,7 +764,7 @@ zvol_request(struct request_queue *q) continue; } - switch (rq_data_dir(req)) { + switch ((int)rq_data_dir(req)) { case READ: zvol_dispatch(zvol_read, req); break;