summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2003-05-09 04:59:36 +0000
committerRichard Sharpe <sharpe@samba.org>2003-05-09 04:59:36 +0000
commitedc51dbc9ce319c612e2ff9434ca5a7521ba016f (patch)
tree64600cc87037231a89311000a61a5ec159815d01
parenta0688316ce0a9bad0b24cbb495f6e0a112227b50 (diff)
downloadsamba-edc51dbc9ce319c612e2ff9434ca5a7521ba016f.tar.gz
samba-edc51dbc9ce319c612e2ff9434ca5a7521ba016f.tar.xz
samba-edc51dbc9ce319c612e2ff9434ca5a7521ba016f.zip
Fix some compiler warnings about const etc ...
-rw-r--r--source/utils/editreg.c7
-rw-r--r--source/utils/profiles.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/source/utils/editreg.c b/source/utils/editreg.c
index c45959799be..709c8d53cd1 100644
--- a/source/utils/editreg.c
+++ b/source/utils/editreg.c
@@ -1041,7 +1041,6 @@ void *str_to_val(int type, char *val, int *len)
default:
return NULL;
- break;
}
return NULL;
@@ -1212,7 +1211,7 @@ int string_to_sid(DOM_SID **sid, char *sid_str)
lstr = strchr(lstr + 1, '-');
}
- return 1;
+ /*return 1; */ /* Not Reached ... */
}
/*
@@ -1380,7 +1379,7 @@ REG_KEY *nt_add_reg_key_list(REGF *regf, REG_KEY *key, char * name, int create)
else { /* Create more space in the list ... */
if (!(list = (KEY_LIST *)realloc(list, sizeof(KEY_LIST) +
(list->max_keys + REG_KEY_LIST_SIZE - 1)
- * sizeof(REG_KEY *))));
+ * sizeof(REG_KEY *))))
goto error;
list->max_keys += REG_KEY_LIST_SIZE;
@@ -1586,7 +1585,7 @@ int data_to_ascii(unsigned char *datap, int len, int type, char *ascii, int asci
if (verbose) fprintf(stderr, "Len: %d\n", len);
/* FIXME. This has to be fixed. It has to be UNICODE */
return uni_to_ascii(datap, ascii, len, ascii_max);
- break;
+ break; /*NOTREACHED*/
case REG_TYPE_EXPANDSZ:
return uni_to_ascii(datap, ascii, len, ascii_max);
diff --git a/source/utils/profiles.c b/source/utils/profiles.c
index 7c2d820c810..afaa83f6384 100644
--- a/source/utils/profiles.c
+++ b/source/utils/profiles.c
@@ -418,10 +418,10 @@ static int my_sid_equal(DOM_SID *s1, DOM_SID *s2)
* Quick and dirty to read a SID in S-1-5-21-x-y-z-rid format and
* construct a DOM_SID
*/
-static int get_sid(DOM_SID *sid, char *sid_str)
+static int get_sid(DOM_SID *sid, const unsigned char *sid_str)
{
int i = 0, auth;
- char *lstr;
+ const unsigned char *lstr;
if (strncmp(sid_str, "S-1-5", 5)) {
fprintf(stderr, "Does not conform to S-1-5...: %s\n", sid_str);