diff options
author | Richard Mudgett <rmudgett@digium.com> | 2014-04-15 18:01:47 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2014-04-15 18:01:47 +0000 |
commit | 45ade68cb48baad5f4f994fae6fe52211f379f70 (patch) | |
tree | 618aa6b37ae7714daa6090c4e7f2a9bc8ded1c0d /res | |
parent | d28af99e65c79f5bb1d336218f37de32313181db (diff) |
Remove unused RAII_VAR() declarations.
* Remove unused RAII_VAR() declarations. The compiler cannot catch these
because the cleanup function "references" the unused variable. Some
actually allocated and released resources that were never used.
* Fixed some whitespace issues in stasis_bridges.c.
........
Merged revisions 412399 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/ari/resource_channels.c | 1 | ||||
-rw-r--r-- | res/ari/resource_recordings.c | 1 | ||||
-rw-r--r-- | res/parking/parking_applications.c | 1 | ||||
-rw-r--r-- | res/parking/parking_manager.c | 3 | ||||
-rw-r--r-- | res/res_ari.c | 1 | ||||
-rw-r--r-- | res/res_fax.c | 1 | ||||
-rw-r--r-- | res/res_parking.c | 1 | ||||
-rw-r--r-- | res/res_pjsip/location.c | 1 | ||||
-rw-r--r-- | res/res_pjsip/security_events.c | 1 | ||||
-rw-r--r-- | res/res_pjsip_refer.c | 1 | ||||
-rw-r--r-- | res/res_pjsip_session.c | 2 | ||||
-rw-r--r-- | res/res_stasis_playback.c | 1 | ||||
-rw-r--r-- | res/res_stasis_recording.c | 1 | ||||
-rw-r--r-- | res/stasis/app.c | 2 | ||||
-rw-r--r-- | res/stasis_recording/stored.c | 1 |
15 files changed, 1 insertions, 18 deletions
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c index 7b7e80739..9d127b2ea 100644 --- a/res/ari/resource_channels.c +++ b/res/ari/resource_channels.c @@ -464,7 +464,6 @@ void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_response *response) { RAII_VAR(struct stasis_app_control *, control, NULL, ao2_cleanup); - RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup); RAII_VAR(struct stasis_app_recording *, recording, NULL, ao2_cleanup); RAII_VAR(char *, recording_url, NULL, ast_free); struct ast_json *json; diff --git a/res/ari/resource_recordings.c b/res/ari/resource_recordings.c index abde4f0c0..bc07d5599 100644 --- a/res/ari/resource_recordings.c +++ b/res/ari/resource_recordings.c @@ -166,7 +166,6 @@ static void control_recording(const char *name, struct ast_ari_response *response) { RAII_VAR(struct stasis_app_recording *, recording, NULL, ao2_cleanup); - RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); enum stasis_app_recording_oper_results res; recording = stasis_app_recording_find_by_name(name); diff --git a/res/parking/parking_applications.c b/res/parking/parking_applications.c index 85075bc5a..3d2eecd29 100644 --- a/res/parking/parking_applications.c +++ b/res/parking/parking_applications.c @@ -553,7 +553,6 @@ static int parked_call_app_exec(struct ast_channel *chan, const char *data) { RAII_VAR(struct parking_lot *, lot, NULL, ao2_cleanup); RAII_VAR(struct parked_user *, pu, NULL, ao2_cleanup); /* Parked user being retrieved */ - RAII_VAR(struct ast_bridge *, parking_bridge, NULL, ao2_cleanup); struct ast_bridge *retrieval_bridge; int res; int target_space = -1; diff --git a/res/parking/parking_manager.c b/res/parking/parking_manager.c index 70a230c56..16e286369 100644 --- a/res/parking/parking_manager.c +++ b/res/parking/parking_manager.c @@ -152,7 +152,6 @@ static struct stasis_subscription *parking_sub; static struct ast_parked_call_payload *parked_call_payload_from_failure(struct ast_channel *chan) { - RAII_VAR(struct ast_parked_call_payload *, payload, NULL, ao2_cleanup); RAII_VAR(struct ast_channel_snapshot *, parkee_snapshot, NULL, ao2_cleanup); ast_channel_lock(chan); @@ -167,7 +166,6 @@ static struct ast_parked_call_payload *parked_call_payload_from_failure(struct a static struct ast_parked_call_payload *parked_call_payload_from_parked_user(struct parked_user *pu, enum ast_parked_call_event_type event_type) { - RAII_VAR(struct ast_parked_call_payload *, payload, NULL, ao2_cleanup); RAII_VAR(struct ast_channel_snapshot *, parkee_snapshot, NULL, ao2_cleanup); long int timeout; long int duration; @@ -177,7 +175,6 @@ static struct ast_parked_call_payload *parked_call_payload_from_parked_user(stru ast_channel_lock(pu->chan); parkee_snapshot = ast_channel_snapshot_create(pu->chan); ast_channel_unlock(pu->chan); - if (!parkee_snapshot) { return NULL; } diff --git a/res/res_ari.c b/res/res_ari.c index 133ca6689..4f16c021c 100644 --- a/res/res_ari.c +++ b/res/res_ari.c @@ -472,7 +472,6 @@ void ast_ari_invoke(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *headers, struct ast_ari_response *response) { - RAII_VAR(char *, response_text, NULL, ast_free); RAII_VAR(struct stasis_rest_handlers *, root, NULL, ao2_cleanup); struct stasis_rest_handlers *handler; RAII_VAR(struct ast_variable *, path_vars, NULL, ast_variables_destroy); diff --git a/res/res_fax.c b/res/res_fax.c index e05b101f7..4f253b758 100644 --- a/res/res_fax.c +++ b/res/res_fax.c @@ -1175,7 +1175,6 @@ static char *generate_filenames_string(struct ast_fax_session_details *details, static int report_fax_status(struct ast_channel *chan, struct ast_fax_session_details *details, const char *status) { RAII_VAR(struct ast_json *, json_object, NULL, ast_json_unref); - RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup); RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup); struct ast_json *json_filenames = NULL; diff --git a/res/res_parking.c b/res/res_parking.c index 6d07818de..c36d558b6 100644 --- a/res/res_parking.c +++ b/res/res_parking.c @@ -689,7 +689,6 @@ static int parking_add_extension(struct ast_context *context, int replace, const static int extension_is_compatible(struct parking_lot_cfg *lot_cfg, const char *app_type, struct ast_exten *extension) { - RAII_VAR(struct parking_lot_cfg *, owner, NULL, ao2_cleanup); const char *extension_registrar = ast_get_extension_registrar(extension); const char *extension_context = ast_get_context_name(ast_get_extension_context(extension)); const char *extension_name = ast_get_extension_name(extension); diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c index e526c4665..2cd852daa 100644 --- a/res/res_pjsip/location.c +++ b/res/res_pjsip/location.c @@ -158,7 +158,6 @@ struct ast_sip_contact *ast_sip_location_retrieve_contact_from_aor_list(const ch while ((aor_name = strsep(&rest, ","))) { RAII_VAR(struct ast_sip_aor *, aor, ast_sip_location_retrieve_aor(aor_name), ao2_cleanup); - RAII_VAR(struct ao2_container *, contacts, NULL, ao2_cleanup); if (!aor) { continue; diff --git a/res/res_pjsip/security_events.c b/res/res_pjsip/security_events.c index 5bb5af90c..5c30e1c5e 100644 --- a/res/res_pjsip/security_events.c +++ b/res/res_pjsip/security_events.c @@ -136,7 +136,6 @@ void ast_sip_report_auth_failed_challenge_response(struct ast_sip_endpoint *endp char call_id[pj_strlen(&rdata->msg_info.cid->id) + 1]; char nonce[64] = "", response[256] = ""; struct ast_sockaddr local, remote; - RAII_VAR(struct ast_sip_endpoint *, artificial, ast_sip_get_artificial_endpoint(), ao2_cleanup); struct ast_security_event_chal_resp_failed chal_resp_failed = { .common.event_type = AST_SECURITY_EVENT_CHAL_RESP_FAILED, diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index 399e9e672..9725caa14 100644 --- a/res/res_pjsip_refer.c +++ b/res/res_pjsip_refer.c @@ -732,7 +732,6 @@ static int refer_incoming_invite_request(struct ast_sip_session *session, struct int response = 0; RAII_VAR(struct ast_sip_session *, other_session, NULL, ao2_cleanup); struct invite_replaces invite; - RAII_VAR(struct ast_bridge *, bridge, NULL, ao2_cleanup); /* If a Replaces header is present make sure it is valid */ if (pjsip_replaces_verify_request(rdata, &other_dlg, PJ_TRUE, &packet) != PJ_SUCCESS) { diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c index 067bf8781..82c7a3f22 100644 --- a/res/res_pjsip_session.c +++ b/res/res_pjsip_session.c @@ -302,7 +302,7 @@ static int validate_incoming_sdp(const pjmedia_sdp_session *sdp) for (i = 0; i < sdp->media_count; ++i) { RAII_VAR(int *, port, ao2_alloc(sizeof(int), NULL), ao2_cleanup); RAII_VAR(int *, port_match, NULL, ao2_cleanup); - RAII_VAR(int *, bundle_match, NULL, ao2_cleanup); + *port = sdp->media[i]->desc.port; port_match = ao2_find(portlist, port, OBJ_KEY); if (port_match) { diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c index 299cb4483..79c2bab9c 100644 --- a/res/res_stasis_playback.c +++ b/res/res_stasis_playback.c @@ -192,7 +192,6 @@ static const char *state_to_string(enum stasis_app_playback_state state) static void playback_publish(struct stasis_app_playback *playback) { RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); - RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup); RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup); ast_assert(playback != NULL); diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c index 080ee7b81..a256fe999 100644 --- a/res/res_stasis_recording.c +++ b/res/res_stasis_recording.c @@ -211,7 +211,6 @@ enum ast_record_if_exists stasis_app_recording_if_exists_parse( static void recording_publish(struct stasis_app_recording *recording, const char *cause) { RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); - RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup); RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup); ast_assert(recording != NULL); diff --git a/res/stasis/app.c b/res/stasis/app.c index 54ee5898e..d9eef4c66 100644 --- a/res/stasis/app.c +++ b/res/stasis/app.c @@ -387,7 +387,6 @@ static struct ast_json *channel_dialplan( struct ast_channel_snapshot *new_snapshot, const struct timeval *tv) { - RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); struct ast_json *json_channel; /* No Newexten event on cache clear or first event */ @@ -422,7 +421,6 @@ static struct ast_json *channel_callerid( struct ast_channel_snapshot *new_snapshot, const struct timeval *tv) { - RAII_VAR(struct ast_json *, json, NULL, ast_json_unref); struct ast_json *json_channel; /* No NewCallerid event on cache clear or first event */ diff --git a/res/stasis_recording/stored.c b/res/stasis_recording/stored.c index 255976d28..03af06987 100644 --- a/res/stasis_recording/stored.c +++ b/res/stasis_recording/stored.c @@ -247,7 +247,6 @@ static int scan_file(struct ao2_container *recordings, { RAII_VAR(struct stasis_app_stored_recording *, recording, NULL, ao2_cleanup); - RAII_VAR(struct ast_str *, name, NULL, ast_free); const char *ext; char *dot; |