Skip to content

Commit

Permalink
Fix switch-bool warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
behlendorf committed Jul 13, 2015
1 parent c2d17fd commit 2b7b78f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2b7b78f

Please sign in to comment.