From: Joerg Sonnenberger Date: Tue, 2 Jun 2015 17:27:28 +0000 (+0200) Subject: Remove const cast from leaf functions. X-Git-Tag: 14.0.0-beta1~900^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9472bbaa95675a6b0e7222a9d6aa05ab5f3e0532;p=thirdparty%2Fasterisk.git Remove const cast from leaf functions. app_control_register_rule and app_control_unregister_rule lock/unlock the queue, which is a mutating operation according to the ao2_lock/_unlock prototype. Depending on the specific (implicit) casts in SCOPED_LOCK and RAII_VAR, the compiler may warn or not. As the only callers of those functions do not have the const, get consistent results by just dropping it. Change-Id: Ib9e6296155a39bc5d627142a3828180c3cfe8fbb --- diff --git a/res/stasis/control.c b/res/stasis/control.c index 0f8b540f05..a61e961373 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -135,7 +135,7 @@ struct stasis_app_control *control_create(struct ast_channel *channel, struct st } static void app_control_register_rule( - const struct stasis_app_control *control, + struct stasis_app_control *control, struct app_control_rules *list, struct stasis_app_control_rule *obj) { SCOPED_AO2LOCK(lock, control->command_queue); @@ -143,7 +143,7 @@ static void app_control_register_rule( } static void app_control_unregister_rule( - const struct stasis_app_control *control, + struct stasis_app_control *control, struct app_control_rules *list, struct stasis_app_control_rule *obj) { struct stasis_app_control_rule *rule;