summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-20 10:02:30 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-20 10:02:30 +0000
commitcc6c263993eaf0715f231fc80ca7e6e65694548b (patch)
tree3dfb8b996e1230bc8909250405bc7df61e9ade4e
parent102af994de6bbfbe94f13c1880fc31c6414c9f8e (diff)
downloadsamba-cc6c263993eaf0715f231fc80ca7e6e65694548b.tar.gz
fixed warnings on irix and crash bug on big endian machines
-rw-r--r--source/lib/username.c8
-rw-r--r--source/lib/util_sock.c2
-rw-r--r--source/lib/util_str.c4
-rw-r--r--source/lib/util_unistr.c6
4 files changed, 12 insertions, 8 deletions
diff --git a/source/lib/username.c b/source/lib/username.c
index 17627d4dae0..8154a2b40e4 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -127,13 +127,13 @@ BOOL map_username(char *user)
*dosname++ = 0;
- while (isspace(*unixname))
+ while (isspace((int)*unixname))
unixname++;
if ('!' == *unixname) {
return_if_mapped = True;
unixname++;
- while (*unixname && isspace(*unixname))
+ while (*unixname && isspace((int)*unixname))
unixname++;
}
@@ -142,7 +142,7 @@ BOOL map_username(char *user)
{
int l = strlen(unixname);
- while (l && isspace(unixname[l-1])) {
+ while (l && isspace((int)unixname[l-1])) {
unixname[l-1] = 0;
l--;
}
@@ -574,7 +574,7 @@ static struct passwd *uname_string_combinations2(char *s,int offset,struct passw
for (i=offset;i<(len-(N-1));i++) {
char c = s[i];
- if (!islower(c))
+ if (!islower((int)c))
continue;
s[i] = toupper(c);
ret = uname_string_combinations2(s,i+1,fn,N-1);
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index 045e18ac228..a56a9741935 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -814,7 +814,7 @@ int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL reb
if( setsockopt(res,SOL_SOCKET,SO_REUSEPORT,(char *)&val,sizeof(val)) == -1 ) {
if( DEBUGLVL( dlevel ) ) {
dbgtext( "open_socket_in(): setsockopt: ");
- dbgtext( "SO_REUSEPORT = %d ", val?"True":"False" );
+ dbgtext( "SO_REUSEPORT = %s ", val?"True":"False" );
dbgtext( "on port %d failed ", port );
dbgtext( "with error = %s\n", strerror(errno) );
}
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 2205f5cf0d0..14d50384c28 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -198,9 +198,9 @@ int strwicmp(const char *psz1, const char *psz2)
/* sync the strings on first non-whitespace */
while (1)
{
- while (isspace(*psz1))
+ while (isspace((int)*psz1))
psz1++;
- while (isspace(*psz2))
+ while (isspace((int)*psz2))
psz2++;
if (toupper(*psz1) != toupper(*psz2) || *psz1 == '\0'
|| *psz2 == '\0')
diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c
index 08fc1760ae8..0a0424763df 100644
--- a/source/lib/util_unistr.c
+++ b/source/lib/util_unistr.c
@@ -105,7 +105,11 @@ void init_valid_table(void)
valid_table = malloc(0x10000);
for (i=0;i<128;i++) valid_table[UCS2_CHAR(i)] = isalnum(i) ||
strchr(allowed,i);
- for (;i<0x10000;i++) valid_table[UCS2_CHAR(i)] = check_dos_char(i);
+ for (;i<0x10000;i++) {
+ smb_ucs2_t c;
+ SSVAL(&c, 0, i);
+ valid_table[c] = check_dos_char(c);
+ }
}