1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

vfs_btrfs: fix compile on 32-bit platforms.

uint64_t are not unsigned longs on 32-bit platforms:

[3265/3996] Compiling source3/modules/vfs_btrfs.c
../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_send’:
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Werror=format]
../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_recv’:
../source3/modules/vfs_btrfs.c:180:2: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘off_t’ [-Werror=format]
cc1: some warnings being treated as errors

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2013-03-23 17:26:57 +10:30
parent 12ebb1ba15
commit fd6d0361d6

View File

@ -117,9 +117,9 @@ static struct tevent_req *btrfs_copy_chunk_send(struct vfs_handle_struct *handle
*/
DEBUG(5, ("BTRFS_IOC_CLONE_RANGE failed: %s, length %lu, "
"src fd: %ld off: %lu, dest fd: %d off: %lu\n",
strerror(errno), cr_args.src_length,
cr_args.src_fd, cr_args.src_offset,
dest_fsp->fh->fd, cr_args.dest_offset));
strerror(errno), (long)cr_args.src_length,
(long)cr_args.src_fd, (long)cr_args.src_offset,
dest_fsp->fh->fd, (long)cr_args.dest_offset));
cc_state->subreq = SMB_VFS_NEXT_COPY_CHUNK_SEND(handle,
cc_state, ev,
src_fsp,
@ -177,7 +177,8 @@ static NTSTATUS btrfs_copy_chunk_recv(struct vfs_handle_struct *handle,
return status;
}
DEBUG(10, ("server side copy chunk copied %lu\n", cc_state->copied));
DEBUG(10, ("server side copy chunk copied %lu\n",
(long)cc_state->copied));
*copied = cc_state->copied;
tevent_req_received(req);
return NT_STATUS_OK;