From 847b7a6236a517d52f4dbc673ef5adce6723eb36 Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 2 Dec 2008 00:25:16 +0000 Subject: Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc and glibc. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@160207 f38db490-d61c-443f-a65b-d21fe96a405b --- main/frame.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/frame.c') diff --git a/main/frame.c b/main/frame.c index 6768d0a98..b73782096 100644 --- a/main/frame.c +++ b/main/frame.c @@ -490,9 +490,12 @@ struct ast_frame *ast_frdup(const struct ast_frame *f) memcpy(out->data, f->data, out->datalen); } if (srclen > 0) { + /* This may seem a little strange, but it's to avoid a gcc (4.2.4) compiler warning */ + char *src; out->src = buf + sizeof(*out) + AST_FRIENDLY_OFFSET + f->datalen; + src = (char *) out->src; /* Must have space since we allocated for it */ - strcpy((char *)out->src, f->src); + strcpy(src, f->src); } ast_copy_flags(out, f, AST_FRFLAG_HAS_TIMING_INFO); out->ts = f->ts; -- cgit v1.2.3