summaryrefslogtreecommitdiff
path: root/source/scripting
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
commitba866665f5baffc1dc703d60114b9f1856c4b886 (patch)
tree5a9b94371b399194b593b0eeee7968adf7753114 /source/scripting
parent560a3058e53479133015d1b0a7cd149393c45438 (diff)
downloadsamba-ba866665f5baffc1dc703d60114b9f1856c4b886.tar.gz
r17791: get rid of another compiler warning
metze
Diffstat (limited to 'source/scripting')
-rw-r--r--source/scripting/ejs/smbcalls_string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/scripting/ejs/smbcalls_string.c b/source/scripting/ejs/smbcalls_string.c
index 2eb9a1b3f7e..d5884cb00f4 100644
--- a/source/scripting/ejs/smbcalls_string.c
+++ b/source/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 ...