summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2003-08-15 04:42:05 +0000
committerHerb Lewis <herb@samba.org>2003-08-15 04:42:05 +0000
commitaa39cc37dab9c4f8c3295d872bb8cc143890b378 (patch)
tree49adb72109be61b3b3e9c1a77c291a0615ecc536 /source3/lib
parent48ceb1b0685f193a1bc95d73401aa48561763dfb (diff)
downloadsamba-aa39cc37dab9c4f8c3295d872bb8cc143890b378.tar.gz
samba-aa39cc37dab9c4f8c3295d872bb8cc143890b378.tar.bz2
samba-aa39cc37dab9c4f8c3295d872bb8cc143890b378.zip
get rid of more compiler warnings
(This used to be commit 398bd14fc6e2f8ab2f34211270e179b8928a6669)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/module.c2
-rw-r--r--source3/lib/util_str.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c
index ac4fe57a2c..d860cba819 100644
--- a/source3/lib/module.c
+++ b/source3/lib/module.c
@@ -41,7 +41,7 @@ NTSTATUS smb_load_module(const char *module_name)
return NT_STATUS_UNSUCCESSFUL;
}
- init = sys_dlsym(handle, "init_module");
+ init = (init_module_function *)sys_dlsym(handle, "init_module");
/* we must check sys_dlerror() to determine if it worked, because
sys_dlsym() can validly return NULL */
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 8d2b996785..eb1c70d412 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -35,7 +35,7 @@
* Based on a routine by GJC@VILLAGE.COM.
* Extensively modified by Andrew.Tridgell@anu.edu.au
**/
-BOOL next_token(char **ptr,char *buff, const char *sep, size_t bufsize)
+BOOL next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
{
char *s;
char *pbuf;
@@ -45,7 +45,7 @@ BOOL next_token(char **ptr,char *buff, const char *sep, size_t bufsize)
if (!ptr)
return(False);
- s = *ptr;
+ s = (char *)*ptr;
/* default to simple separators */
if (!sep)
@@ -82,13 +82,13 @@ parameter so you can pass NULL. This is useful for user interface code
but beware the fact that it is not re-entrant!
**/
-static char *last_ptr=NULL;
+static const char *last_ptr=NULL;
-BOOL next_token_nr(char **ptr,char *buff, const char *sep, size_t bufsize)
+BOOL next_token_nr(const char **ptr,char *buff, const char *sep, size_t bufsize)
{
BOOL ret;
if (!ptr)
- ptr = (char **)&last_ptr;
+ ptr = &last_ptr;
ret = next_token(ptr, buff, sep, bufsize);
last_ptr = *ptr;
@@ -109,7 +109,7 @@ void set_first_token(char *ptr)
char **toktocliplist(int *ctok, const char *sep)
{
- char *s=last_ptr;
+ char *s=(char *)last_ptr;
int ictok=0;
char **ret, **iret;
@@ -132,7 +132,7 @@ char **toktocliplist(int *ctok, const char *sep)
} while(*s);
*ctok=ictok;
- s=last_ptr;
+ s=(char *)last_ptr;
if (!(ret=iret=malloc(ictok*sizeof(char *))))
return NULL;