diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-24 13:33:44 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-11-30 11:00:58 -0500 |
commit | b7e768b7e3522695ed36dcb48ecdcd344bd30a9b (patch) | |
tree | 3c9b8b5c87a7880ccd5b2c7b9221b0c375920a18 /fs/cachefiles/namei.c | |
parent | c5a94f434c82529afda290df3235e4d85873c5b4 (diff) |
cachefiles: Explicitly cast enumerated type in put_object
Clang warns when one enumerated type is implicitly converted to another.
fs/cachefiles/namei.c:247:50: warning: implicit conversion from
enumeration type 'enum cachefiles_obj_ref_trace' to different
enumeration type 'enum fscache_obj_ref_trace' [-Wenum-conversion]
cache->cache.ops->put_object(&xobject->fscache,
cachefiles_obj_put_wait_retry);
Silence this warning by explicitly casting to fscache_obj_ref_trace,
which is also done in put_object.
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/cachefiles/namei.c')
-rw-r--r-- | fs/cachefiles/namei.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 95983c744164..5ab411d4bc59 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -244,11 +244,13 @@ wait_for_old_object: | |||
244 | 244 | ||
245 | ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &xobject->flags)); | 245 | ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &xobject->flags)); |
246 | 246 | ||
247 | cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_retry); | 247 | cache->cache.ops->put_object(&xobject->fscache, |
248 | (enum fscache_obj_ref_trace)cachefiles_obj_put_wait_retry); | ||
248 | goto try_again; | 249 | goto try_again; |
249 | 250 | ||
250 | requeue: | 251 | requeue: |
251 | cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_timeo); | 252 | cache->cache.ops->put_object(&xobject->fscache, |
253 | (enum fscache_obj_ref_trace)cachefiles_obj_put_wait_timeo); | ||
252 | _leave(" = -ETIMEDOUT"); | 254 | _leave(" = -ETIMEDOUT"); |
253 | return -ETIMEDOUT; | 255 | return -ETIMEDOUT; |
254 | } | 256 | } |