From aa39cc37dab9c4f8c3295d872bb8cc143890b378 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 15 Aug 2003 04:42:05 +0000 Subject: get rid of more compiler warnings (This used to be commit 398bd14fc6e2f8ab2f34211270e179b8928a6669) --- source3/lib/module.c | 2 +- source3/lib/util_str.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/lib') 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; -- cgit