From 1b2ad20c6811a916650a0c510724d9f1b8a7d6d1 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Mon, 21 Oct 2013 06:37:30 +0000 Subject: Re #1630 (misc): Fixed compiler warnings. Thanks to Mark Michelson for the patch. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4624 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/samples/icedemo.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'pjsip-apps') diff --git a/pjsip-apps/src/samples/icedemo.c b/pjsip-apps/src/samples/icedemo.c index 266b800a..9d811374 100644 --- a/pjsip-apps/src/samples/icedemo.c +++ b/pjsip-apps/src/samples/icedemo.c @@ -514,9 +514,9 @@ static void icedemo_stop_session(void) reset_rem_info(); } -#define PRINT(fmt, arg0, arg1, arg2, arg3, arg4, arg5) \ +#define PRINT(...) \ printed = pj_ansi_snprintf(p, maxlen - (p-buffer), \ - fmt, arg0, arg1, arg2, arg3, arg4, arg5); \ + __VA_ARGS__); \ if (printed <= 0 || printed >= (int)(maxlen - (p-buffer))) \ return -PJ_ETOOSMALL; \ p += printed @@ -540,8 +540,7 @@ static int print_cand(char buffer[], unsigned maxlen, (unsigned)pj_sockaddr_get_port(&cand->addr)); PRINT("%s\n", - pj_ice_get_cand_type_name(cand->type), - 0, 0, 0, 0, 0); + pj_ice_get_cand_type_name(cand->type)); if (p == buffer+maxlen) return -PJ_ETOOSMALL; @@ -563,8 +562,7 @@ static int encode_session(char buffer[], unsigned maxlen) pj_status_t status; /* Write "dummy" SDP v=, o=, s=, and t= lines */ - PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n", - 0, 0, 0, 0, 0, 0); + PRINT("v=0\no=- 3414953978 3414953978 IN IP4 localhost\ns=ice\nt=0 0\n"); /* Get ufrag and pwd from current session */ pj_ice_strans_get_ufrag_pwd(icedemo.icest, &local_ufrag, &local_pwd, @@ -575,8 +573,7 @@ static int encode_session(char buffer[], unsigned maxlen) (int)local_ufrag.slen, local_ufrag.ptr, (int)local_pwd.slen, - local_pwd.ptr, - 0, 0); + local_pwd.ptr); /* Write each component */ for (comp=0; comp