summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-08-24 11:13:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:43 -0500
commit2fe8a02f98b6c5a1788f209b3e2ed4231323b6b0 (patch)
tree9a3cd961f65583cf5a98e5334c024be1c8e1ce7f
parent1d8fa3ccac93d5307cbf63f7f02c46ae6ec268d8 (diff)
downloadsamba-2fe8a02f98b6c5a1788f209b3e2ed4231323b6b0.tar.gz
samba-2fe8a02f98b6c5a1788f209b3e2ed4231323b6b0.tar.bz2
samba-2fe8a02f98b6c5a1788f209b3e2ed4231323b6b0.zip
r17791: get rid of another compiler warning
metze (This used to be commit ba866665f5baffc1dc703d60114b9f1856c4b886)
-rw-r--r--source4/scripting/ejs/smbcalls_string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c
index 2eb9a1b3f7..d5884cb00f 100644
--- a/source4/scripting/ejs/smbcalls_string.c
+++ b/source4/scripting/ejs/smbcalls_string.c
@@ -242,13 +242,14 @@ failed:
usage:
str = sprintf("i=%d s=%7s", 7, "foo");
*/
+typedef char *(*_asprintf_append_t)(char *, const char *, ...);
static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
{
const char *format;
const char *p;
char *ret;
int a = 1;
- char *(*_asprintf_append)(char *, const char *, ...);
+ _asprintf_append_t _asprintf_append;
TALLOC_CTX *tmp_ctx;
if (argc < 1 || argv[0]->type != MPR_TYPE_STRING) {
ejsSetErrorMsg(eid, "sprintf invalid arguments");
@@ -259,7 +260,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
ret = talloc_strdup(tmp_ctx, "");
/* avoid all the format string warnings */
- _asprintf_append = talloc_asprintf_append;
+ _asprintf_append = (_asprintf_append_t)talloc_asprintf_append;
/*
hackity hack ...