From: Bob Glossman Date: Wed, 24 Apr 2013 13:43:35 +0000 (-0700) Subject: LU-3179 build: fix compilation error with gcc 4.7.2 X-Git-Tag: 2.4.51~24 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e3afa6f49cd12e746f579d38c081b88f3db855cc;p=fs%2Flustre-release.git LU-3179 build: fix compilation error with gcc 4.7.2 use cast to resolve build warning from gcc 4.7.2 Signed-off-by: Bob Glossman Change-Id: I4356e621f5b9c687a6b76b12a93b664d542e1c79 Reviewed-on: http://review.whamcloud.com/6141 Reviewed-by: Alex Zhuravlev Tested-by: Hudson Tested-by: Maloo Reviewed-by: Keith Mannthey Reviewed-by: Nikitas Angelinas Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/nrs_crr.c b/lustre/ptlrpc/nrs_crr.c index 0335bf9..6545913 100644 --- a/lustre/ptlrpc/nrs_crr.c +++ b/lustre/ptlrpc/nrs_crr.c @@ -278,7 +278,7 @@ int nrs_crrn_ctl(struct ptlrpc_nrs_policy *policy, enum ptlrpc_nrs_ctl opc, { LASSERT(spin_is_locked(&policy->pol_nrs->nrs_lock)); - switch(opc) { + switch((enum nrs_ctl_crr)opc) { default: RETURN(-EINVAL); diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index bc4b373..5363629 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -759,7 +759,7 @@ int nrs_orr_ctl(struct ptlrpc_nrs_policy *policy, enum ptlrpc_nrs_ctl opc, { LASSERT(spin_is_locked(&policy->pol_nrs->nrs_lock)); - switch(opc) { + switch((enum nrs_ctl_orr)opc) { default: RETURN(-EINVAL);