The type that an enum is promoted to for arithmetic is compiler
dependent. We can't assume that it's an int, or a short.
Explicitly cast the volume state enum where clang gets upset.
Change-Id: Iab285d3a04dac698797ab0df2337aee75e3876b2
Reviewed-on: http://gerrit.openafs.org/9137
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
static_inline int
VnIsValidState(VnState state)
{
- if ((state >= 0) &&
+ if (((int) state >= 0) &&
(state < VN_STATE_COUNT)) {
return 1;
}
VCreateReservation_r(vp);
if (LogLevel >= 5) {
- Log("VShutdownVolume_r: vid=%" AFS_VOLID_FMT ", device=%d, state=%hu\n",
+ Log("VShutdownVolume_r: vid=%" AFS_VOLID_FMT ", device=%d, state=%u\n",
afs_printable_VolumeId_lu(vp->hashid), vp->partition->device,
- V_attachState(vp));
+ (unsigned int) V_attachState(vp));
}
/* wait for other blocking ops to finish */
static_inline int
VIsValidState(VolState state)
{
- if ((state >= 0) &&
+ if (((int) state >= 0) &&
(state < VOL_STATE_COUNT)) {
return 1;
}