summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorSteven Danneman <steven.danneman@isilon.com>2008-09-15 15:47:43 -0700
committerJeremy Allison <jra@samba.org>2008-09-15 16:13:24 -0700
commit47feb1722896bfcd20ec56df39bc0c87fd706563 (patch)
tree35b2837a90a361a80c0e297bfe1b647eaa0f192b /source3/torture
parent06b2410427f763427475226d78247405b9384756 (diff)
downloadsamba-47feb1722896bfcd20ec56df39bc0c87fd706563.tar.gz
samba-47feb1722896bfcd20ec56df39bc0c87fd706563.tar.bz2
samba-47feb1722896bfcd20ec56df39bc0c87fd706563.zip
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.
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 28400887ef..dddd5bef29 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/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;
}