From bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 1 Aug 2023 20:06:45 -0400 Subject: bcachefs: Assorted fixes for clang clang had a few more warnings about enum conversion, and also didn't like the opts.c initializer. Signed-off-by: Kent Overstreet --- fs/bcachefs/darray.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/bcachefs/darray.h') diff --git a/fs/bcachefs/darray.h b/fs/bcachefs/darray.h index d4485fa01b2a..114f86b45fd5 100644 --- a/fs/bcachefs/darray.h +++ b/fs/bcachefs/darray.h @@ -59,13 +59,13 @@ static inline int __darray_make_room(darray_void *d, size_t t_size, size_t more, #define darray_first(_d) ((_d).data[0]) #define darray_last(_d) ((_d).data[(_d).nr - 1]) -#define darray_insert_item(_d, _pos, _item) \ +#define darray_insert_item(_d, pos, _item) \ ({ \ - size_t pos = (_pos); \ + size_t _pos = (pos); \ int _ret = darray_make_room((_d), 1); \ \ if (!_ret) \ - array_insert_item((_d)->data, (_d)->nr, pos, (_item)); \ + array_insert_item((_d)->data, (_d)->nr, _pos, (_item)); \ _ret; \ }) -- cgit v1.2.3