summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 13:27:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:41 -0500
commitdccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch)
tree7c0f8e64f4ded3701818b8968171597eccd62267 /source4/param
parentffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff)
downloadsamba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/generic.c12
-rw-r--r--source4/param/loadparm.c12
2 files changed, 13 insertions, 11 deletions
diff --git a/source4/param/generic.c b/source4/param/generic.c
index ca52934950..cc269af1ec 100644
--- a/source4/param/generic.c
+++ b/source4/param/generic.c
@@ -177,15 +177,15 @@ void param_set_ulong(struct param_context *ctx, const char *section, const char
p->value = talloc_asprintf(p, "%lu", value);
}
-static BOOL param_sfunc (const char *name, void *_ctx)
+static bool param_sfunc (const char *name, void *_ctx)
{
- struct param_context *ctx = _ctx;
+ struct param_context *ctx = (struct param_context *)_ctx;
struct param_section *section = param_get_section(ctx, name);
if (section == NULL) {
section = talloc_zero(ctx, struct param_section);
if (section == NULL)
- return False;
+ return false;
section->name = talloc_strdup(section, name);
@@ -195,12 +195,12 @@ static BOOL param_sfunc (const char *name, void *_ctx)
/* Make sure this section is on top of the list for param_pfunc */
DLIST_PROMOTE(ctx->sections, section);
- return True;
+ return true;
}
-static BOOL param_pfunc (const char *name, const char *value, void *_ctx)
+static bool param_pfunc (const char *name, const char *value, void *_ctx)
{
- struct param_context *ctx = _ctx;
+ struct param_context *ctx = (struct param_context *)_ctx;
struct param *p = param_section_get(ctx->sections, name);
if (!p) {
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 83c852ace7..a38e9d9e9e 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -595,7 +595,7 @@ static void init_globals(void)
parm_table[i].ptr &&
!(parm_table[i].flags & FLAG_CMDLINE)) {
string_set(talloc_autofree_context(),
- parm_table[i].ptr, "");
+ (char **)parm_table[i].ptr, "");
}
}
@@ -1473,12 +1473,14 @@ static void copy_service(struct service *pserviceDest,
break;
case P_STRING:
- string_set(pserviceDest, dest_ptr,
+ string_set(pserviceDest,
+ (char **)dest_ptr,
*(char **)src_ptr);
break;
case P_USTRING:
- string_set(pserviceDest, dest_ptr,
+ string_set(pserviceDest,
+ (char **)dest_ptr,
*(char **)src_ptr);
strupper(*(char **)dest_ptr);
break;
@@ -1904,11 +1906,11 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
break;
case P_STRING:
- string_set(mem_ctx, parm_ptr, pszParmValue);
+ string_set(mem_ctx, (char **)parm_ptr, pszParmValue);
break;
case P_USTRING:
- string_set(mem_ctx, parm_ptr, pszParmValue);
+ string_set(mem_ctx, (char **)parm_ptr, pszParmValue);
strupper(*(char **)parm_ptr);
break;