diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-12-04 13:56:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:21 -0500 |
commit | 9112a632f6791ffc3c3c1aadd214cbaba8fe816e (patch) | |
tree | 129b941d550b15e919461dedcde286f1697ba94d /source4/torture/basic | |
parent | 4127edc1afd702ac3bcb77893ba864eb98729451 (diff) | |
download | samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.tar.gz samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.tar.bz2 samba-9112a632f6791ffc3c3c1aadd214cbaba8fe816e.zip |
r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)
all this fixes a lot of gcc-4 warnings
metze
(This used to be commit b94f92bc6637f748d6f7049f4f9a30b0b8d18a7a)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/aliases.c | 10 | ||||
-rw-r--r-- | source4/torture/basic/denytest.c | 18 | ||||
-rw-r--r-- | source4/torture/basic/locking.c | 6 | ||||
-rw-r--r-- | source4/torture/basic/utable.c | 8 |
4 files changed, 21 insertions, 21 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c index 50aabb825a..018bfd9f1a 100644 --- a/source4/torture/basic/aliases.c +++ b/source4/torture/basic/aliases.c @@ -125,7 +125,7 @@ static void qfileinfo_aliases(struct smbcli_state *cli) printf("ERROR: open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); } - smbcli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2)); + smbcli_write(cli->tree, fnum, 0, &t2, 0, sizeof(t2)); SSVAL(t2.in.params.data, 0, fnum); @@ -165,7 +165,7 @@ static void qpathinfo_aliases(struct smbcli_state *cli) printf("ERROR: open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); } - smbcli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2)); + smbcli_write(cli->tree, fnum, 0, &t2, 0, sizeof(t2)); smbcli_close(cli->tree, fnum); SIVAL(t2.in.params.data, 2, 0); @@ -209,7 +209,7 @@ static void findfirst_aliases(struct smbcli_state *cli) printf("ERROR: open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); } - smbcli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2)); + smbcli_write(cli->tree, fnum, 0, &t2, 0, sizeof(t2)); smbcli_close(cli->tree, fnum); SSVAL(t2.in.params.data, 0, 0); @@ -321,7 +321,7 @@ static void setfileinfo_aliases(struct smbcli_state *cli) printf("ERROR: open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); } - smbcli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2)); + smbcli_write(cli->tree, fnum, 0, &t2, 0, sizeof(t2)); SSVAL(t2.in.params.data, 0, fnum); SSVAL(t2.in.params.data, 4, 0); @@ -362,7 +362,7 @@ static void setpathinfo_aliases(struct smbcli_state *cli) printf("ERROR: open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree)); } - smbcli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2)); + smbcli_write(cli->tree, fnum, 0, &t2, 0, sizeof(t2)); smbcli_close(cli->tree, fnum); SSVAL(t2.in.params.data, 2, 0); diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c index 7979778c3f..0e0032058f 100644 --- a/source4/torture/basic/denytest.c +++ b/source4/torture/basic/denytest.c @@ -1454,12 +1454,12 @@ BOOL torture_denytest1(void) } else if (fnum2 == -1) { res = A_0; } else { - char x = 1; + uint8_t x = 1; res = A_0; - if (smbcli_read(cli1->tree, fnum2, (void *)&x, 0, 1) == 1) { + if (smbcli_read(cli1->tree, fnum2, &x, 0, 1) == 1) { res += A_R; } - if (smbcli_write(cli1->tree, fnum2, 0, (void *)&x, 0, 1) == 1) { + if (smbcli_write(cli1->tree, fnum2, 0, &x, 0, 1) == 1) { res += A_W; } } @@ -1551,12 +1551,12 @@ BOOL torture_denytest2(void) } else if (fnum2 == -1) { res = A_0; } else { - char x = 1; + uint8_t x = 1; res = A_0; - if (smbcli_read(cli2->tree, fnum2, (void *)&x, 0, 1) == 1) { + if (smbcli_read(cli2->tree, fnum2, &x, 0, 1) == 1) { res += A_R; } - if (smbcli_write(cli2->tree, fnum2, 0, (void *)&x, 0, 1) == 1) { + if (smbcli_write(cli2->tree, fnum2, 0, &x, 0, 1) == 1) { res += A_W; } } @@ -1782,7 +1782,7 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c union smb_open io1, io2; extern int torture_numops; int failures = 0; - char buf[1]; + uint8_t buf[1]; ZERO_STRUCT(buf); @@ -1843,11 +1843,11 @@ static BOOL torture_ntdenytest(struct smbcli_state *cli1, struct smbcli_state *c } else { res = A_0; if (smbcli_read(cli2->tree, - io2.ntcreatex.out.fnum, (void *)buf, 0, sizeof(buf)) >= 1) { + io2.ntcreatex.out.fnum, buf, 0, sizeof(buf)) >= 1) { res += A_R; } if (smbcli_write(cli2->tree, - io2.ntcreatex.out.fnum, 0, (void *)buf, 0, sizeof(buf)) >= 1) { + io2.ntcreatex.out.fnum, 0, buf, 0, sizeof(buf)) >= 1) { res += A_W; } } diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c index ba7d568706..7a1a13762b 100644 --- a/source4/torture/basic/locking.c +++ b/source4/torture/basic/locking.c @@ -464,7 +464,7 @@ BOOL torture_locktest4(void) const char *fname = "\\lockt4.lck"; int fnum1, fnum2, f; BOOL ret; - char buf[1000]; + uint8_t buf[1000]; BOOL correct = True; if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { @@ -632,7 +632,7 @@ BOOL torture_locktest5(void) const char *fname = "\\lockt5.lck"; int fnum1, fnum2, fnum3; BOOL ret; - char buf[1000]; + uint8_t buf[1000]; BOOL correct = True; if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { @@ -792,7 +792,7 @@ BOOL torture_locktest7(void) int fnum1; int fnum2 = -1; size_t size; - char buf[200]; + uint8_t buf[200]; BOOL correct = False; if (!torture_open_connection(&cli1)) { diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c index f9233595cf..01984077a3 100644 --- a/source4/torture/basic/utable.c +++ b/source4/torture/basic/utable.c @@ -28,7 +28,7 @@ BOOL torture_utable(void) fstring fname; const char *alt_name; int fnum; - char c2[4]; + uint8_t c2[4]; int c, len, fd; int chars_allowed=0, alt_allowed=0; uint8_t valid[0x10000]; @@ -102,7 +102,7 @@ BOOL torture_utable(void) static char *form_name(int c) { static fstring fname; - char c2[4]; + uint8_t c2[4]; char *p; int len; @@ -178,7 +178,7 @@ BOOL torture_casetable(void) return False; } - smbcli_read(cli->tree, fnum, (char *)c2, 0, size); + smbcli_read(cli->tree, fnum, c2, 0, size); printf("%04x: ", c); equiv[c][0] = c; for (i=0; i<size/sizeof(int); i++) { @@ -189,7 +189,7 @@ BOOL torture_casetable(void) fflush(stdout); } - smbcli_write(cli->tree, fnum, 0, (char *)&c, size, sizeof(c)); + smbcli_write(cli->tree, fnum, 0, &c, size, sizeof(c)); smbcli_close(cli->tree, fnum); } |