summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 10:41:59 -0700
committerJeremy Allison <jra@samba.org>2011-05-05 10:41:59 -0700
commit4f41be356a4e6b311d30de3b2e36e4c33aa72ca3 (patch)
tree91adb9035c762c36a6cb24f242c11408779bd3f7 /source3/libsmb
parent10a628b6e181af07f0c43db36ba017411b4eaaaa (diff)
downloadsamba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.tar.gz
samba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.tar.bz2
samba-4f41be356a4e6b311d30de3b2e36e4c33aa72ca3.zip
Fix many const compiler warnings.
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmb_context.c6
-rw-r--r--source3/libsmb/libsmb_file.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 9c8429aab4..f81631e5f6 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -456,11 +456,11 @@ smbc_option_get(SMBCCTX *context,
switch(smbc_getOptionSmbEncryptionLevel(context))
{
case 0:
- return (void *) "none";
+ return discard_const_p(void, "none");
case 1:
- return (void *) "request";
+ return discard_const_p(void, "request");
case 2:
- return (void *) "require";
+ return discard_const_p(void, "require");
}
} else if (strcmp(option_name, "smb_encrypt_on") == 0) {
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index 4ab6cd22e5..e21eff3029 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -378,7 +378,7 @@ SMBC_write_ctx(SMBCCTX *context,
/*d_printf(">>>write: resolved path as %s\n", targetpath);*/
status = cli_writeall(targetcli, file->cli_fd,
- 0, (uint8_t *)buf, offset, count, NULL);
+ 0, (const uint8_t *)buf, offset, count, NULL);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
TALLOC_FREE(frame);