[asterisk-commits] mjordan: branch 13 r433747 - in /branches/13: ./ channels/ include/asterisk/ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Mar 29 21:39:21 CDT 2015
Author: mjordan
Date: Sun Mar 29 21:39:18 2015
New Revision: 433747
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433747
Log:
clang compiler warnings: Fix invalid enum conversion
This patch fixes some invalid enum conversion warnings caught by clang. In
particular:
* chan_sip: Several functions mixed usage of the st_refresher_param
enum and st_refresher enum. This patch corrects the functions to use the
right enum.
* chan_pjsip: Fixed mixed usage of ast_sip_session_t38state and ast_t38_state.
* strings: Fixed incorrect usage of AO2 flags with strings container.
* res_stasis: Change a return enumeration to stasis_app_user_event_res.
Review: https://reviewboard.asterisk.org/r/4535
ASTERISK-24917
Reported by: dkdegroot
patches:
rb4535.patch submitted by dkdegroot (License 6600)
........
Merged revisions 433746 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/13/ (props changed)
branches/13/channels/chan_pjsip.c
branches/13/channels/chan_sip.c
branches/13/include/asterisk/strings.h
branches/13/main/strings.c
branches/13/res/res_stasis.c
Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/13/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_pjsip.c?view=diff&rev=433747&r1=433746&r2=433747
==============================================================================
--- branches/13/channels/chan_pjsip.c (original)
+++ branches/13/channels/chan_pjsip.c Sun Mar 29 21:39:18 2015
@@ -919,7 +919,7 @@
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
struct ast_sip_session *session = channel->session;
int res = -1;
- enum ast_sip_session_t38state state = T38_STATE_UNAVAILABLE;
+ enum ast_t38_state state = T38_STATE_UNAVAILABLE;
switch (option) {
case AST_OPTION_T38_STATE:
Modified: branches/13/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_sip.c?view=diff&rev=433747&r1=433746&r2=433747
==============================================================================
--- branches/13/channels/chan_sip.c (original)
+++ branches/13/channels/chan_sip.c Sun Mar 29 21:39:18 2015
@@ -1491,7 +1491,7 @@
static void stop_session_timer(struct sip_pvt *p);
static void start_session_timer(struct sip_pvt *p);
static void restart_session_timer(struct sip_pvt *p);
-static const char *strefresherparam2str(enum st_refresher r);
+static const char *strefresherparam2str(enum st_refresher_param r);
static int parse_session_expires(const char *p_hdrval, int *const p_interval, enum st_refresher_param *const p_ref);
static int parse_minse(const char *p_hdrval, int *const p_interval);
static int st_get_se(struct sip_pvt *, int max);
@@ -19099,12 +19099,12 @@
{ -1, NULL },
};
-static const char *strefresherparam2str(enum st_refresher r)
+static const char *strefresherparam2str(enum st_refresher_param r)
{
return map_x_s(strefresher_params, r, "Unknown");
}
-static enum st_refresher str2strefresherparam(const char *s)
+static enum st_refresher_param str2strefresherparam(const char *s)
{
return map_s_x(strefresher_params, s, -1);
}
@@ -21545,7 +21545,7 @@
ast_cli(a->fd, " S-Timer Peer Sts: %s\n", cur->stimer->st_active_peer_ua ? "Active" : "Inactive");
ast_cli(a->fd, " S-Timer Cached Min-SE: %d\n", cur->stimer->st_cached_min_se);
ast_cli(a->fd, " S-Timer Cached SE: %d\n", cur->stimer->st_cached_max_se);
- ast_cli(a->fd, " S-Timer Cached Ref: %s\n", strefresherparam2str(cur->stimer->st_cached_ref));
+ ast_cli(a->fd, " S-Timer Cached Ref: %s\n", strefresher2str(cur->stimer->st_cached_ref));
ast_cli(a->fd, " S-Timer Cached Mode: %s\n", stmode2str(cur->stimer->st_cached_mode));
}
}
Modified: branches/13/include/asterisk/strings.h
URL: http://svnview.digium.com/svn/asterisk/branches/13/include/asterisk/strings.h?view=diff&rev=433747&r1=433746&r2=433747
==============================================================================
--- branches/13/include/asterisk/strings.h (original)
+++ branches/13/include/asterisk/strings.h Sun Mar 29 21:39:18 2015
@@ -1233,7 +1233,8 @@
* \retval AO2 container for strings
* \retval NULL if allocation failed
*/
-struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets);
+//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets);
+struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets);
/*!
* \since 12
Modified: branches/13/main/strings.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/strings.c?view=diff&rev=433747&r1=433746&r2=433747
==============================================================================
--- branches/13/main/strings.c (original)
+++ branches/13/main/strings.c Sun Mar 29 21:39:18 2015
@@ -167,7 +167,8 @@
return strcmp(lhs, rhs) ? 0 : CMP_MATCH;
}
-struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets)
+//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets)
+struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets)
{
return ao2_container_alloc_options(opts, buckets, str_hash, str_cmp);
}
Modified: branches/13/res/res_stasis.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_stasis.c?view=diff&rev=433747&r1=433746&r2=433747
==============================================================================
--- branches/13/res/res_stasis.c (original)
+++ branches/13/res/res_stasis.c Sun Mar 29 21:39:18 2015
@@ -1800,7 +1800,7 @@
RAII_VAR(struct ast_multi_object_blob *, multi, NULL, ao2_cleanup);
RAII_VAR(void *, obj, NULL, ao2_cleanup);
RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
- enum stasis_app_subscribe_res res = STASIS_APP_USER_INTERNAL_ERROR;
+ enum stasis_app_user_event_res res = STASIS_APP_USER_INTERNAL_ERROR;
struct ast_json *json_value;
int have_channel = 0;
int i;
More information about the asterisk-commits
mailing list