summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-04 01:03:23 +0000
committerJeremy Allison <jra@samba.org>2000-10-04 01:03:23 +0000
commit23f78fd7b91878176c518471cdca84cad826cba9 (patch)
tree477d465d5b415d25789c9d53153c9d4a636c2b96 /source3/lib
parent6692d0905e3e8605884ced5d38efb26929648d29 (diff)
downloadsamba-23f78fd7b91878176c518471cdca84cad826cba9.tar.gz
samba-23f78fd7b91878176c518471cdca84cad826cba9.tar.bz2
samba-23f78fd7b91878176c518471cdca84cad826cba9.zip
Adding Herb's compile warning fixes to HEAD.
Jeremy. (This used to be commit d131ad1ce3f6e72e295f865a463f8dcbfa6f8d42)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/kanji.c8
-rw-r--r--source3/lib/messages.c2
-rw-r--r--source3/lib/msrpc_use.c2
-rw-r--r--source3/lib/util_sid.c10
-rw-r--r--source3/lib/util_unistr.c8
5 files changed, 17 insertions, 13 deletions
diff --git a/source3/lib/kanji.c b/source3/lib/kanji.c
index fe65f98b58..ca81933a19 100644
--- a/source3/lib/kanji.c
+++ b/source3/lib/kanji.c
@@ -422,11 +422,11 @@ static int euc2sjis (int hi, int lo)
static int sjis2euc (int hi, int lo)
{
int minidx = 0;
- int maxidx = SJISCONVTBLSIZ;
+ int maxidx = SJISCONVTBLSIZ -1; /* max index 1 less than number of entries */
int i = ( 0 + SJISCONVTBLSIZ ) % 2;
int w = (int)((hi << 8) | lo);
- if ( (sjisconv[0].start < w) && (w < sjisconv[SJISCONVTBLSIZ].end) ) {
+ if ( (sjisconv[0].start < w) && (w < sjisconv[SJISCONVTBLSIZ-1].end) ) {
while (maxidx >= minidx) {
if ( sjisconv[i].start > w ) {
maxidx = i-1;
@@ -778,11 +778,11 @@ static char *euc3_to_sj(char *from, BOOL overwrite)
static int sjis2jis(int hi, int lo)
{
int minidx = 0;
- int maxidx = SJISCONVTBLSIZ;
+ int maxidx = SJISCONVTBLSIZ -1; /* max index 1 less than number of entries */
int i = (0 + SJISCONVTBLSIZ) % 2;
int w = (int)((hi << 8) | lo);
- if ((sjisconv[0].start < w) && (w < sjisconv[SJISCONVTBLSIZ].end)) {
+ if ((sjisconv[0].start < w) && (w < sjisconv[SJISCONVTBLSIZ-1].end)) {
while (maxidx >= minidx) {
if (sjisconv[i].start > w) {
maxidx = i-1;
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 2409e5b1e8..258610f409 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -89,7 +89,7 @@ BOOL message_init(void)
return False;
}
- CatchSignal(SIGUSR1, sig_usr1);
+ CatchSignal(SIGUSR1, SIGNAL_CAST sig_usr1);
message_register(MSG_PING, ping_message);
diff --git a/source3/lib/msrpc_use.c b/source3/lib/msrpc_use.c
index cf6f63c669..7558a266b3 100644
--- a/source3/lib/msrpc_use.c
+++ b/source3/lib/msrpc_use.c
@@ -148,7 +148,7 @@ static struct msrpc_use *msrpc_find(const char* pipe_name,
continue;
}
if (!usr_creds->reuse &&
- !pwd_compare(&usr_creds->ntc.pwd, &c->cli->usr.ntc.pwd))
+ !pwd_compare((struct pwd_info *)&usr_creds->ntc.pwd, &c->cli->usr.ntc.pwd))
{
DEBUG(100,("password doesn't match\n"));
continue;
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index b4b88c9d88..80254318c4 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -51,8 +51,12 @@ typedef struct _known_sid_users {
} known_sid_users;
/* static known_sid_users no_users[] = {{0, 0, NULL}}; */
-static known_sid_users everyone_users[] = {{ 0, SID_NAME_WKN_GRP, "Everyone" }, {0, 0, NULL}};
-static known_sid_users creator_owner_users[] = {{ 0, SID_NAME_ALIAS, "Creator Owner" }, {0, 0, NULL}};
+static known_sid_users everyone_users[] = {
+ { 0, SID_NAME_WKN_GRP, "Everyone" },
+ {0, (enum SID_NAME_USE)0, NULL}};
+static known_sid_users creator_owner_users[] = {
+ { 0, SID_NAME_ALIAS, "Creator Owner" },
+ {0, (enum SID_NAME_USE)0, NULL}};
static known_sid_users nt_authority_users[] = {
{ 1, SID_NAME_ALIAS, "Dialup" },
{ 2, SID_NAME_ALIAS, "Network"},
@@ -64,7 +68,7 @@ static known_sid_users nt_authority_users[] = {
{ 9, SID_NAME_ALIAS, "ServerLogon"},
{ 11, SID_NAME_ALIAS, "Authenticated Users"},
{ 18, SID_NAME_ALIAS, "SYSTEM"},
- { 0, 0, NULL}};
+ { 0, (enum SID_NAME_USE)0, NULL}};
static struct sid_name_map_info
{
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 93f5490ffc..3282761ff8 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -945,8 +945,8 @@ int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2)
return c1 - c2;
if (c1 == 0)
- return 0;
- }
+ break;
+ }
return 0;
}
@@ -966,9 +966,9 @@ int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len)
return c1 - c2;
if (c1 == 0)
- return 0;
+ break;
- }
+ }
return 0;
}