diff options
author | Steven Danneman <steven.danneman@isilon.com> | 2008-09-15 16:28:30 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-09-16 09:19:41 +0200 |
commit | 3cbed0e4f196af56ca9a1fe7b219c4b86bfcb5cb (patch) | |
tree | bc62330855cec3c2e20ad098f91dadfeed5996cc | |
parent | 06b7980f5b3dee9d17c31ed03688296f523ae393 (diff) | |
download | samba-3cbed0e4f196af56ca9a1fe7b219c4b86bfcb5cb.tar.gz |
Fix build warning on FreeBSD
Fix for the following build warning:
Compiling torture/cmd_vfs.c
torture/cmd_vfs.c: In function `cmd_open':
torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3)
torture/cmd_vfs.c: In function `cmd_mknod':
torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3)
sccanf had mismatched types for mode_t between formating parameter and var args.
(cherry picked from commit d10c386472175ceb312b9bcca07822a6df66a266)
-rw-r--r-- | source/torture/cmd_vfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/torture/cmd_vfs.c b/source/torture/cmd_vfs.c index 28400887ef7..dddd5bef29f 100644 --- a/source/torture/cmd_vfs.c +++ b/source/torture/cmd_vfs.c @@ -272,7 +272,7 @@ static NTSTATUS cmd_open(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c flagstr++; } if ((flags & O_CREAT) && argc == 4) { - if (sscanf(argv[3], "%o", &mode) == 0) { + if (sscanf(argv[3], "%ho", (unsigned short *)&mode) == 0) { printf("open: error=-1 (invalid mode!)\n"); return NT_STATUS_UNSUCCESSFUL; } @@ -989,7 +989,7 @@ static NTSTATUS cmd_mknod(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, return NT_STATUS_OK; } - if (sscanf(argv[2], "%o", &mode) == 0) { + if (sscanf(argv[2], "%ho", (unsigned short *)&mode) == 0) { printf("open: error=-1 (invalid mode!)\n"); return NT_STATUS_UNSUCCESSFUL; } |