mirror of
https://github.com/samba-team/samba.git
synced 2025-03-23 06:50:21 +03:00
(merge from 3.0)
I think this was tpot's originally: Fix format types for 64 bit systems. Andrew Bartlett (This used to be commit 256b2da7c96e8313f4f98ce700fc7634eaccb72b)
This commit is contained in:
parent
870105d74f
commit
35f843a1be
@ -1427,7 +1427,7 @@ BOOL torture_denytest1(int dummy)
|
||||
cli_close(cli1, fnum1);
|
||||
}
|
||||
|
||||
printf("testing %d entries\n", ARRAY_SIZE(denytable1));
|
||||
printf("testing %ld entries\n", (unsigned long)ARRAY_SIZE(denytable1));
|
||||
|
||||
for (i=0; i<ARRAY_SIZE(denytable1); i++) {
|
||||
enum deny_result res;
|
||||
|
@ -427,9 +427,9 @@ static BOOL rw_torture3(struct cli_state *c, char *lockfname)
|
||||
sizeof(buf)-count);
|
||||
if (sent < 0)
|
||||
{
|
||||
printf("read failed offset:%d size:%d (%s)\n",
|
||||
count, sizeof(buf)-count,
|
||||
cli_errstr(c));
|
||||
printf("read failed offset:%d size:%ld (%s)\n",
|
||||
count, (unsigned long)sizeof(buf)-count,
|
||||
cli_errstr(c));
|
||||
correct = False;
|
||||
sent = 0;
|
||||
}
|
||||
@ -438,8 +438,7 @@ static BOOL rw_torture3(struct cli_state *c, char *lockfname)
|
||||
if (memcmp(buf_rd+count, buf+count, sent) != 0)
|
||||
{
|
||||
printf("read/write compare failed\n");
|
||||
printf("offset: %d req %d recvd %d\n",
|
||||
count, sizeof(buf)-count, sent);
|
||||
printf("offset: %d req %ld recvd %ld\n", count, (unsigned long)sizeof(buf)-count, (unsigned long)sent);
|
||||
correct = False;
|
||||
break;
|
||||
}
|
||||
@ -504,7 +503,8 @@ static BOOL rw_torture2(struct cli_state *c1, struct cli_state *c2)
|
||||
|
||||
if ((bytes_read = cli_read(c2, fnum2, buf_rd, 0, buf_size)) != buf_size) {
|
||||
printf("read failed (%s)\n", cli_errstr(c2));
|
||||
printf("read %d, expected %d\n", bytes_read, buf_size);
|
||||
printf("read %d, expected %ld\n", bytes_read,
|
||||
(unsigned long)buf_size);
|
||||
correct = False;
|
||||
break;
|
||||
}
|
||||
@ -620,9 +620,11 @@ static BOOL run_readwritelarge(int dummy)
|
||||
}
|
||||
|
||||
if (fsize == sizeof(buf))
|
||||
printf("readwritelarge test 1 succeeded (size = %x)\n", fsize);
|
||||
printf("readwritelarge test 1 succeeded (size = %lx)\n",
|
||||
(unsigned long)fsize);
|
||||
else {
|
||||
printf("readwritelarge test 1 failed (size = %x)\n", fsize);
|
||||
printf("readwritelarge test 1 failed (size = %lx)\n",
|
||||
(unsigned long)fsize);
|
||||
correct = False;
|
||||
}
|
||||
|
||||
@ -652,9 +654,11 @@ static BOOL run_readwritelarge(int dummy)
|
||||
}
|
||||
|
||||
if (fsize == sizeof(buf))
|
||||
printf("readwritelarge test 2 succeeded (size = %x)\n", fsize);
|
||||
printf("readwritelarge test 2 succeeded (size = %lx)\n",
|
||||
(unsigned long)fsize);
|
||||
else {
|
||||
printf("readwritelarge test 2 failed (size = %x)\n", fsize);
|
||||
printf("readwritelarge test 2 failed (size = %lx)\n",
|
||||
(unsigned long)fsize);
|
||||
correct = False;
|
||||
}
|
||||
|
||||
|
@ -165,8 +165,8 @@ BOOL torture_casetable(int dummy)
|
||||
int c2[MAX_EQUIVALENCE];
|
||||
|
||||
if (size/sizeof(int) >= MAX_EQUIVALENCE) {
|
||||
printf("too many chars match?? size=%d c=0x%04x\n",
|
||||
size, c);
|
||||
printf("too many chars match?? size=%ld c=0x%04x\n",
|
||||
(unsigned long)size, c);
|
||||
cli_close(cli, fnum);
|
||||
return False;
|
||||
}
|
||||
|
@ -2080,8 +2080,8 @@ enum {
|
||||
if ((challenge_len = strhex_to_str(challenge,
|
||||
strlen(hex_challenge),
|
||||
hex_challenge)) != 8) {
|
||||
x_fprintf(x_stderr, "hex decode of %s failed (only got %u bytes)!\n",
|
||||
hex_challenge, challenge_len);
|
||||
x_fprintf(x_stderr, "hex decode of %s failed (only got %lu bytes)!\n",
|
||||
hex_challenge, (unsigned long)challenge_len);
|
||||
exit(1);
|
||||
}
|
||||
opt_challenge = data_blob(challenge, challenge_len);
|
||||
|
@ -203,7 +203,8 @@ static void profilelevel_cb(int msg_type, pid_t pid, void *buf, size_t len)
|
||||
num_replies++;
|
||||
|
||||
if (len != sizeof(int)) {
|
||||
fprintf(stderr, "invalid message length %d returned\n", len);
|
||||
fprintf(stderr, "invalid message length %ld returned\n",
|
||||
(unsigned long)len);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ static void save_file(const char *fname, void *packet, size_t length)
|
||||
return;
|
||||
}
|
||||
close(fd);
|
||||
printf("Wrote %d bytes to %s\n", length, fname);
|
||||
printf("Wrote %ld bytes to %s\n", (unsigned long)length, fname);
|
||||
}
|
||||
|
||||
static void filter_reply(char *buf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user