]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11615 fix compiler warning
authorSeven Du <dujinfang@gmail.com>
Thu, 17 Jan 2019 07:38:13 +0000 (15:38 +0800)
committerSeven Du <dujinfang@gmail.com>
Thu, 17 Jan 2019 07:38:13 +0000 (15:38 +0800)
tests/unit/switch_event.c
tests/unit/switch_hash.c
tests/unit/switch_ivr_originate.c

index c11dfc24d3df226d9a933af975af576c154d6e59..1f55b574b92c85ca5501920367ffe58aa7ac3b12 100644 (file)
@@ -27,7 +27,7 @@ FST_TEST_BEGIN(benchmark)
   int rc = 0, loops = 10, x = 0;
   switch_status_t status = SWITCH_STATUS_SUCCESS;
   char **index = NULL;
-  unsigned long long micro_total = 0;
+  uint64_t micro_total = 0;
   double micro_per = 0;
   double rate_per_sec = 0;
 
@@ -63,7 +63,7 @@ FST_TEST_BEGIN(benchmark)
   micro_total = small_end_ts - small_start_ts;
   micro_per = micro_total / (double) loops;
   rate_per_sec = 1000000 / micro_per;
-  printf("switch_event add_header: Total %ldus / %ld loops, %.2f us per loop, %.0f loops per second\n", 
+  printf("switch_event add_header: Total %" SWITCH_UINT64_T_FMT "us / %d loops, %.2f us per loop, %.0f loops per second\n",
        micro_total, loops, micro_per, rate_per_sec);
 #endif
 
@@ -84,7 +84,7 @@ FST_TEST_BEGIN(benchmark)
   micro_total = small_end_ts - small_start_ts;
   micro_per = micro_total / (double) loops;
   rate_per_sec = 1000000 / micro_per;
-  printf("switch_event get_header: Total %ldus / %ld loops, %.2f us per loop, %.0f loops per second\n", 
+  printf("switch_event get_header: Total %" SWITCH_UINT64_T_FMT "us / %d loops, %.2f us per loop, %.0f loops per second\n", 
        micro_total, loops, micro_per, rate_per_sec);
 #endif
 
@@ -101,7 +101,7 @@ FST_TEST_BEGIN(benchmark)
   micro_total = end_ts - start_ts;
   micro_per = micro_total / (double) loops;
   rate_per_sec = 1000000 / micro_per;
-  printf("switch_event Total %ldus / %d loops, %.2f us per loop, %.0f loops per second\n", 
+  printf("switch_event Total %" SWITCH_UINT64_T_FMT "us / %d loops, %.2f us per loop, %.0f loops per second\n", 
        micro_total, loops, micro_per, rate_per_sec);
 
 }
index a8d57c527ce3426e19f9cc19ca0380f35d486a12..43d3e186922ea2d97913236b15d6ecc2b3a32d73 100644 (file)
@@ -24,7 +24,7 @@ FST_TEST_BEGIN(benchmark)
   switch_bool_t verbose = SWITCH_TRUE;
   const char *err = NULL;
   switch_time_t start_ts, end_ts;
-  unsigned long long micro_total = 0;
+  uint64_t micro_total = 0;
   double micro_per = 0;
   double rate_per_sec = 0;
   int x = 0;
@@ -131,7 +131,7 @@ FST_TEST_BEGIN(benchmark)
   micro_total = end_ts - start_ts;
   micro_per = micro_total / (double) loops;
   rate_per_sec = 1000000 / micro_per;
-  printf("switch_hash Total %ldus / %d loops, %.2f us per loop, %.0f loops per second\n", 
+  printf("switch_hash Total %" SWITCH_UINT64_T_FMT "us / %d loops, %.2f us per loop, %.0f loops per second\n", 
        micro_total, loops, micro_per, rate_per_sec);
 }
 FST_TEST_END()
index 3b2cb4154b9b0659bae799376eefdec6e622ac73..1b7ff19a4a5ae391bfef8a68a5393bf45088a91b 100644 (file)
@@ -42,6 +42,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
        switch_assert(session);
        reporting++;
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "session reporting %d\n", reporting);
+
+       return SWITCH_STATUS_SUCCESS;
 }
 
 static switch_status_t my_on_destroy(switch_core_session_t *session)
@@ -49,6 +51,8 @@ static switch_status_t my_on_destroy(switch_core_session_t *session)
        switch_assert(session);
        destroy++;
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "session destroy %d\n", destroy);
+
+       return SWITCH_STATUS_SUCCESS;
 }
 
 static switch_state_handler_table_t state_handlers = {