diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/access.c | 2 | ||||
-rw-r--r-- | source3/lib/charset.c | 6 | ||||
-rw-r--r-- | source3/lib/debug.c | 6 | ||||
-rw-r--r-- | source3/lib/kanji.c | 4 | ||||
-rw-r--r-- | source3/lib/smbrun.c | 1 | ||||
-rw-r--r-- | source3/lib/util.c | 4 |
6 files changed, 10 insertions, 13 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c index d2286e2515..2e1eb8df55 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -106,7 +106,7 @@ static int string_match(char *tok,char *s) if (strncmp(tok, s, tok_len) == 0) return (True); } else if ((cut = strchr(tok, '/')) != 0) { /* netnumber/netmask */ - if (isdigit(s[0]) && masked_match(tok, cut, s)) + if (isdigit((int)s[0]) && masked_match(tok, cut, s)) return (True); } return (False); diff --git a/source3/lib/charset.c b/source3/lib/charset.c index 5e9481f9bb..abfa6fe787 100644 --- a/source3/lib/charset.c +++ b/source3/lib/charset.c @@ -161,7 +161,7 @@ void charset_initialise(void) } for (i=0;i<=127;i++) { - if (isalnum((char)i) || strchr("._^$~!#%&-{}()@'`",(char)i)) + if (isalnum(i) || strchr("._^$~!#%&-{}()@'`",(char)i)) add_dos_char(i,False,0,False); } @@ -172,8 +172,8 @@ void charset_initialise(void) /* Some systems have buggy isupper/islower for characters above 127. Best not to rely on them. */ if(i < 128) { - if (isupper(c)) lower_char_map[i] = tolower(c); - if (islower(c)) upper_char_map[i] = toupper(c); + if (isupper((int)c)) lower_char_map[i] = tolower(c); + if (islower((int)c)) upper_char_map[i] = toupper(c); } } } diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 24f508c0b4..1303d0433b 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -112,7 +112,7 @@ static int format_pos = 0; * catch a sigusr2 - decrease the debug log level. * ************************************************************************** ** */ -int sig_usr2( void ) +void sig_usr2( int sig ) { BlockSignals( True, SIGUSR2 ); @@ -125,7 +125,6 @@ int sig_usr2( void ) BlockSignals( False, SIGUSR2 ); CatchSignal( SIGUSR2, SIGNAL_CAST sig_usr2 ); - return( 0 ); } /* sig_usr2 */ #endif /* SIGUSR2 */ @@ -134,7 +133,7 @@ int sig_usr2( void ) * catch a sigusr1 - increase the debug log level. * ************************************************************************** ** */ -int sig_usr1( void ) +void sig_usr1( int sig ) { BlockSignals( True, SIGUSR1 ); @@ -148,7 +147,6 @@ int sig_usr1( void ) BlockSignals( False, SIGUSR1 ); CatchSignal( SIGUSR1, SIGNAL_CAST sig_usr1 ); - return( 0 ); } /* sig_usr1 */ #endif /* SIGUSR1 */ diff --git a/source3/lib/kanji.c b/source3/lib/kanji.c index 523eb178e2..4ca5984d80 100644 --- a/source3/lib/kanji.c +++ b/source3/lib/kanji.c @@ -856,7 +856,7 @@ static char *hex_to_sj(char *from, BOOL overwrite) sp = (char *) from; dp = cvtbuf; while (*sp) { - if (*sp == hex_tag && isxdigit (sp[1]) && isxdigit (sp[2])) { + if (*sp == hex_tag && isxdigit((int)sp[1]) && isxdigit((int)sp[2])) { *dp++ = (hex2bin (sp[1])<<4) | (hex2bin (sp[2])); sp += 3; } else @@ -924,7 +924,7 @@ static char *cap_to_sj(char *from, BOOL overwrite) * we only do the reverse (that's why the strchr is used rather than * isxdigit. Based on fix from ado@elsie.nci.nih.gov (Arthur David Olson). */ - if (*sp == hex_tag && (strchr ("89abcdefABCDEF", sp[1]) != NULL) && isxdigit (sp[2])) { + if (*sp == hex_tag && (strchr ("89abcdefABCDEF", sp[1]) != NULL) && isxdigit((int)sp[2])) { *dp++ = (hex2bin (sp[1])<<4) | (hex2bin (sp[2])); sp += 3; } else diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c index 0388b3f1bd..fcb14378a0 100644 --- a/source3/lib/smbrun.c +++ b/source3/lib/smbrun.c @@ -85,7 +85,6 @@ if shared is not set then open the file with O_EXCL set ****************************************************************************/ int smbrun(char *cmd,char *outfile,BOOL shared) { - extern struct current_user current_user; int fd,pid; int uid = current_user.uid; int gid = current_user.gid; diff --git a/source3/lib/util.c b/source3/lib/util.c index 863e2d94af..c1eb7cc879 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3636,7 +3636,7 @@ uint32 interpret_addr(char *str) if (strcmp(str,"255.255.255.255") == 0) return(0xFFFFFFFF); for (i=0; pure_address && str[i]; i++) - if (!(isdigit(str[i]) || str[i] == '.')) + if (!(isdigit((int)str[i]) || str[i] == '.')) pure_address = False; /* if it's in the form of an IP address then get the lib to interpret it */ @@ -4608,7 +4608,7 @@ BOOL fcntl_lock(int fd,int op,uint32 offset,uint32 count,int type) (lock.l_pid != 0) && (lock.l_pid != getpid())) { - DEBUG(3,("fd %d is locked by pid %d\n",fd,lock.l_pid)); + DEBUG(3,("fd %d is locked by pid %d\n",fd,(int)lock.l_pid)); return(True); } |