summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-17 09:20:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:34 -0500
commite835621799647ee70630b389fb53d15b15d68355 (patch)
tree429a4ab67cf53f2853ba93f4628b63cd5aac2b02 /source4/torture/basic
parentccc65fb995154451537879b57b900b8b4e340bd2 (diff)
downloadsamba-e835621799647ee70630b389fb53d15b15d68355.tar.gz
samba-e835621799647ee70630b389fb53d15b15d68355.tar.bz2
samba-e835621799647ee70630b389fb53d15b15d68355.zip
r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the automatic builds. The main fixes are: - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats - use of NULL format statements to perform dn searches. - assumption that sizeof() returns an int (This used to be commit a58ea6b3854973b694d2b1e22323ed7eb00e3a3f)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/aliases.c4
-rw-r--r--source4/torture/basic/delaywrite.c19
-rw-r--r--source4/torture/basic/denytest.c2
-rw-r--r--source4/torture/basic/locking.c3
-rw-r--r--source4/torture/basic/utable.c2
5 files changed, 18 insertions, 12 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index edea3d963e..364dfeecf2 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -55,7 +55,7 @@ static void gen_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int lev
DLIST_ADD(alias_blobs, t2b);
d_printf("\tFound level %4u (0x%03x) of size %3d (0x%02x)\n",
level, level,
- t2b->data.length, t2b->data.length);
+ (int)t2b->data.length, t2b->data.length);
count++;
}
@@ -285,7 +285,7 @@ static void gen_set_aliases(struct smbcli_state *cli, struct smb_trans2 *t2, int
DLIST_ADD(alias_blobs, t2b);
d_printf("\tFound level %4u (0x%03x) of size %3d (0x%02x)\n",
level, level,
- t2->in.data.length, t2->in.data.length);
+ (int)t2->in.data.length, t2->in.data.length);
count++;
}
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 7839581caa..ebce013170 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -72,7 +72,8 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
written = smbcli_write(cli->tree, fnum1, 0, "x", 0, 1);
if (written != 1) {
- printf("write failed - wrote %d bytes (%s)\n", written, __location__);
+ printf("write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return False;
}
@@ -239,7 +240,8 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
written = smbcli_write(cli->tree, fnum1, 0, "0123456789", 1, 10);
if (written != 10) {
- printf("write failed - wrote %d bytes (%s)\n", written, __location__);
+ printf("write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return False;
}
@@ -294,7 +296,8 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
written = smbcli_write(cli->tree, fnum2, 0, "0123456789", 11, 10);
if (written != 10) {
- printf("write failed - wrote %d bytes (%s)\n", written, __location__);
+ printf("write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return False;
}
@@ -319,7 +322,8 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
written = smbcli_write(cli->tree, fnum2, 0, "0123456789", 21, 10);
if (written != 10) {
- printf("write failed - wrote %d bytes (%s)\n", written, __location__);
+ printf("write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return False;
}
@@ -397,7 +401,8 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
written = smbcli_write(cli->tree, fnum1, 0, "0123456789", 31, 10);
if (written != 10) {
- printf("write failed - wrote %d bytes (%s)\n", written, __location__);
+ printf("write failed - wrote %d bytes (%s)\n",
+ (int)written, __location__);
return False;
}
@@ -511,7 +516,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
if (written != 1) {
printf("(%s) written gave %d - should have been 1\n",
- __location__, written);
+ __location__, (int)written);
ret = False;
goto done;
}
@@ -532,7 +537,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
if (written != 1) {
printf("(%s) written gave %d - should have been 1\n",
- __location__, written);
+ __location__, (int)written);
ret = False;
goto done;
}
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 35c22ff19f..8d16fa5e73 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1433,7 +1433,7 @@ BOOL torture_denytest1(void)
smbcli_close(cli1->tree, fnum1);
}
- printf("testing %d entries\n", ARRAY_SIZE(denytable1));
+ printf("testing %d entries\n", (int)ARRAY_SIZE(denytable1));
GetTimeOfDay(&tv_start);
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index 3f395f3907..3ab26c3879 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -959,7 +959,8 @@ BOOL torture_locktest7(void)
}
if (size != 0) {
- printf("Unable to truncate locked file. Size was %u (%s)\n", size, __location__);
+ printf("Unable to truncate locked file. Size was %u (%s)\n",
+ (unsigned)size, __location__);
correct = False;
goto fail;
}
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index ea1bb76b8c..cf3b07886a 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -175,7 +175,7 @@ BOOL torture_casetable(void)
if (size/sizeof(int) >= MAX_EQUIVALENCE) {
printf("too many chars match?? size=%d c=0x%04x\n",
- size, c);
+ (int)size, c);
smbcli_close(cli->tree, fnum);
return False;
}