]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Compiler fixes for GCC when printf %s is NULL
authorAlexander Traud <pabstraud@compuserve.com>
Fri, 30 Oct 2020 08:46:10 +0000 (09:46 +0100)
committerKevin Harwell <kharwell@digium.com>
Tue, 3 Nov 2020 21:47:33 +0000 (15:47 -0600)
ASTERISK-29146

Change-Id: Ib04bdad87d729f805f5fc620ef9952f58ea96d41

channels/chan_iax2.c
channels/chan_sip.c
main/indications.c
res/res_stir_shaken.c

index db4bef31bfa1059b0281ebbd5360a98ed3ca40d1..5a3ed803ce9266dfcd6f6a130c55515ca327ad5b 100644 (file)
@@ -2800,7 +2800,7 @@ static int add_calltoken_ignore(const char *addr)
        int error = 0;
 
        if (ast_strlen_zero(addr)) {
-               ast_log(LOG_WARNING, "invalid calltokenoptional %s\n", addr);
+               ast_log(LOG_WARNING, "invalid calltokenoptional (null)\n");
                return -1;
        }
 
index d6f4a473e102bed300b3f5aa58b9b8d584d1f7ae..dc1466137c47db25f4a0be002ae7a0e7d0ffe115 100644 (file)
@@ -28805,7 +28805,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
                if (start && !found_supported) {
                        /* Format requested that we do not support */
                        transmit_response(p, "406 Not Acceptable", req);
-                       ast_debug(2, "Received SIP mailbox subscription for unknown format: %s\n", accept);
+                       ast_debug(2, "Received SIP mailbox subscription for unknown format\n");
                        pvt_set_needdestroy(p, "unknown format");
                        if (authpeer) {
                                sip_unref_peer(authpeer, "sip_unref_peer, from handle_request_subscribe (authpeer 3)");
@@ -30385,7 +30385,7 @@ static void proc_422_rsp(struct sip_pvt *p, struct sip_request *rsp)
 
        p_hdrval = sip_get_header(rsp, "Min-SE");
        if (ast_strlen_zero(p_hdrval)) {
-               ast_log(LOG_WARNING, "422 response without a Min-SE header %s\n", p_hdrval);
+               ast_log(LOG_WARNING, "422 response without a Min-SE header\n");
                return;
        }
        rtn = parse_minse(p_hdrval, &minse);
index 88cd7b4ab812d695ef166142be09543559c78896..d55c2475b437c3facfa47cb891e9f4ea0f6802c7 100644 (file)
@@ -702,7 +702,11 @@ static char *handle_cli_indication_add(struct ast_cli_entry *e, int cmd, struct
        ast_tone_zone_lock(tz);
 
        if (ast_register_indication(tz, a->argv[3], a->argv[4])) {
-               ast_log(LOG_WARNING, "Unable to register indication %s/%s\n", a->argv[2], a->argv[3]);
+               if (ast_strlen_zero(a->argv[3])) {
+                       ast_log(LOG_WARNING, "Unable to register indication %s\n", a->argv[2]);
+               } else {
+                       ast_log(LOG_WARNING, "Unable to register indication %s/%s\n", a->argv[2], a->argv[3]);
+               }
                if (created_country) {
                        ast_unregister_indication_country(a->argv[2]);
                }
index 7a141f7c6494012fd4be1c704f89a415fb1ec65e..30326d36b6f69eeeffbc78bb1775fa9b29aea5ff 100644 (file)
@@ -1200,7 +1200,7 @@ static int stir_shaken_read(struct ast_channel *chan, const char *function,
         */
        if (ast_strlen_zero(second)) {
                ast_log(LOG_ERROR, "Retrieving a value using %s requires two paramaters (index, value) "
-                       "- only index was given (%s)\n", function, second);
+                       "- only index was given\n", function);
                return -1;
        }