From cac6a060af598bf94e6414b06e7365ec51ca360e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Apr 1998 19:24:06 +0000 Subject: Changes to allow Samba to be compiled with -Wstrict-prototypes with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e) --- source3/lib/access.c | 4 ++-- source3/lib/charcnv.c | 10 +++++----- source3/lib/fault.c | 4 ++-- source3/lib/getsmbpass.c | 2 +- source3/lib/interface.c | 2 +- source3/lib/system.c | 2 -- source3/lib/username.c | 8 ++++---- source3/lib/util.c | 4 ++-- 8 files changed, 17 insertions(+), 19 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/access.c b/source3/lib/access.c index cc2bf8632b..fe78700edd 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -35,7 +35,7 @@ static char sep[] = ", \t"; #define FAIL (-1) /* Forward declarations. */ -static int list_match(char *list,char *item, int (*match_fn)()); +static int list_match(char *list,char *item, int (*match_fn)(char *, char *)); static int client_match(char *tok,char *item); static int string_match(char *tok,char *s); static int masked_match(char *tok, char *slash, char *s); @@ -118,7 +118,7 @@ BOOL allow_access(char *deny_list,char *allow_list,char *cname,char *caddr) /* list_match - match an item against a list of tokens with exceptions */ /* (All modifications are marked with the initials "jkf") */ -static int list_match(char *list,char *item, int (*match_fn)()) +static int list_match(char *list,char *item, int (*match_fn)(char *, char *)) { char *tok; char *listcopy; /* jkf */ diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index e92e8170f0..42be32ccb3 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -30,7 +30,7 @@ static BOOL mapsinited = 0; static char unix2dos[256]; static char dos2unix[256]; -static void initmaps() { +static void initmaps(void) { int k; for (k = 0; k < 256; k++) unix2dos[k] = k; @@ -51,7 +51,7 @@ static void update_map(char * str) { } } -static void init_iso8859_1() { +static void init_iso8859_1(void) { int i; if (!mapsinited) initmaps(); @@ -81,7 +81,7 @@ update_map("\370\233\371\227\372\243\373\226\374\201\375\354\376\347\377\230"); /* Init for eastern european languages. */ -static void init_iso8859_2() { +static void init_iso8859_2(void) { int i; if (!mapsinited) initmaps(); @@ -118,7 +118,7 @@ update_map("\377\372"); /* Added by Max Khon */ -static void init_iso8859_5() +static void init_iso8859_5(void) { int i; if (!mapsinited) initmaps(); @@ -145,7 +145,7 @@ update_map("\374\360\377\240"); /* Init for russian language (koi8) */ -static void init_koi8_r() +static void init_koi8_r(void) { if (!mapsinited) initmaps(); diff --git a/source3/lib/fault.c b/source3/lib/fault.c index e3299c50db..f46ccbb185 100644 --- a/source3/lib/fault.c +++ b/source3/lib/fault.c @@ -23,7 +23,7 @@ extern int DEBUGLEVEL; -static void (*cont_fn)(); +static void (*cont_fn)(void *); /******************************************************************* @@ -66,7 +66,7 @@ static void sig_fault(int sig) /******************************************************************* setup our fault handlers ********************************************************************/ -void fault_setup(void (*fn)()) +void fault_setup(void (*fn)(void *)) { cont_fn = fn; diff --git a/source3/lib/getsmbpass.c b/source3/lib/getsmbpass.c index 3996c45269..68754f0848 100644 --- a/source3/lib/getsmbpass.c +++ b/source3/lib/getsmbpass.c @@ -161,5 +161,5 @@ char *getsmbpass(char *prompt) #else - void getsmbpasswd_dummy() {;} + void getsmbpasswd_dummy(void) {;} #endif diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 9687e1336c..8c1610e9cb 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -453,7 +453,7 @@ int iface_count(void) /**************************************************************************** True if we have two or more interfaces. **************************************************************************/ -BOOL we_are_multihomed() +BOOL we_are_multihomed(void) { static int multi = -1; diff --git a/source3/lib/system.c b/source3/lib/system.c index f5fbae53ab..3eef8e5034 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -215,8 +215,6 @@ static int copy_reg(char *source, const char *dest) { struct stat source_stats; int ifd; - int full_write(); - int safe_read(); int ofd; char *buf; int len; /* Number of bytes read into `buf'. */ diff --git a/source3/lib/username.c b/source3/lib/username.c index 751b0e5336..6c65d5d8cb 100644 --- a/source3/lib/username.c +++ b/source3/lib/username.c @@ -23,8 +23,8 @@ extern int DEBUGLEVEL; /* internal functions - modified versions of the ones in password.c */ -static struct passwd *uname_string_combinations(char *s, struct passwd * (*fn) (), int N); -static struct passwd *uname_string_combinations2(char *s, int offset, struct passwd * (*fn) (), int N); +static struct passwd *uname_string_combinations(char *s, struct passwd * (*fn) (char *), int N); +static struct passwd *uname_string_combinations2(char *s, int offset, struct passwd * (*fn) (char *), int N); /**************************************************************************** get a users home directory. tries as-is then lower case @@ -288,7 +288,7 @@ try all combinations with N uppercase letters. offset is the first char to try and change (start with 0) it assumes the string starts lowercased ****************************************************************************/ -static struct passwd *uname_string_combinations2(char *s,int offset,struct passwd *(*fn)(),int N) +static struct passwd *uname_string_combinations2(char *s,int offset,struct passwd *(*fn)(char *),int N) { int len = strlen(s); int i; @@ -322,7 +322,7 @@ try all combinations with up to N uppercase letters. offset is the first char to try and change (start with 0) it assumes the string starts lowercased ****************************************************************************/ -static struct passwd * uname_string_combinations(char *s,struct passwd * (*fn)(),int N) +static struct passwd * uname_string_combinations(char *s,struct passwd * (*fn)(char *),int N) { int n; struct passwd *ret; diff --git a/source3/lib/util.c b/source3/lib/util.c index 96cb86a1d8..2990a336c5 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3721,7 +3721,7 @@ static BOOL matchname(char *remotehost,struct in_addr addr) static BOOL global_client_name_done = False; static BOOL global_client_addr_done = False; -void reset_globals_after_fork() +void reset_globals_after_fork(void) { global_client_name_done = False; global_client_addr_done = False; @@ -4621,7 +4621,7 @@ void set_remote_arch(enum remote_arch_types type) /******************************************************************* Get the remote_arch type. ********************************************************************/ -enum remote_arch_types get_remote_arch() +enum remote_arch_types get_remote_arch(void) { return ra_type; } -- cgit