Skip to content

Commit 8af8f70

Browse files
committed
libcephfs_proxy: remove arithmetic on void*
this change is created in the same spirit of bb1fa81. when building the tree with clang-21, following warning was raised: ``` /home/kefu/dev/ceph/src/libcephfs_proxy/proxy_async.c:43:9: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith] 43 | data += iov->iov_len; | ~~~~ ^ 1 warning generated. ``` this change should address this warning by casting a `void*` pointer to `char*` pointer before performing arithmetic operation on it. Signed-off-by: Kefu Chai <[email protected]>
1 parent b3a6c35 commit 8af8f70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcephfs_proxy/proxy_async.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static int32_t libcephfsd_cbk_nonblocking_rw(proxy_async_t *async,
4040
}
4141

4242
memcpy(iov->iov_base, data, iov->iov_len);
43-
data += iov->iov_len;
43+
data = (char*)data + iov->iov_len;
4444
size -= iov->iov_len;
4545
iov++;
4646
count--;

0 commit comments

Comments
 (0)