diff options
author | Benny Prijono <bennylp@teluu.com> | 2014-02-04 10:13:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2014-02-04 10:13:56 +0000 |
commit | 0c03f9d1a434ca591f40980eff388daff653ce0d (patch) | |
tree | 00bd27f374d46c7825a372e7892de140c1a9e5e4 /pjlib/src/pjlib-test/test.c | |
parent | 1342a94d5cbd8820f83ef59adcb18d14f566a3de (diff) |
Misc (re #1630): Fixing warnings about variable set but not used with recent gcc
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4728 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pjlib-test/test.c')
-rw-r--r-- | pjlib/src/pjlib-test/test.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/pjlib/src/pjlib-test/test.c b/pjlib/src/pjlib-test/test.c index 94d77bfb..2015b18b 100644 --- a/pjlib/src/pjlib-test/test.c +++ b/pjlib/src/pjlib-test/test.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* +/* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "test.h" #include <pjlib.h> @@ -38,7 +38,7 @@ pj_pool_factory *mem; int param_echo_sock_type; const char *param_echo_server = ECHO_SERVER_ADDRESS; int param_echo_port = ECHO_SERVER_START_PORT; -int param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | +int param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC; int null_func() @@ -63,7 +63,7 @@ int test_inner(void) app_perror("pj_init() error!!", rc); return rc; } - + //pj_dump_config(); pj_caching_pool_init( &caching_pool, NULL, 0 ); @@ -98,7 +98,7 @@ int test_inner(void) #if INCLUDE_STRING_TEST DO_TEST( string_test() ); #endif - + #if INCLUDE_FIFOBUF_TEST DO_TEST( fifobuf_test() ); #endif @@ -184,8 +184,8 @@ int test_inner(void) if (param_echo_sock_type == 0) param_echo_sock_type = pj_SOCK_DGRAM(); - echo_client( param_echo_sock_type, - param_echo_server, + echo_client( param_echo_sock_type, + param_echo_server, param_echo_port); #endif @@ -196,18 +196,18 @@ on_return: pj_caching_pool_destroy( &caching_pool ); PJ_LOG(3,("test", "")); - + pj_thread_get_stack_info(pj_thread_this(), &filename, &line); - PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", + PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", pj_thread_get_stack_max_usage(pj_thread_this()), filename, line)); if (rc == 0) PJ_LOG(3,("test", "Looks like everything is okay!..")); else PJ_LOG(3,("test", "Test completed with error(s)")); - + pj_shutdown(); - + return 0; } @@ -217,14 +217,12 @@ int test_main(void) { PJ_USE_EXCEPTION; - pj_AF_INET(); - PJ_TRY { return test_inner(); } PJ_CATCH_ANY { int id = PJ_GET_EXCEPTION(); - PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", + PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", id, pj_exception_id_name(id))); } PJ_END; |