]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core, mod_mariadb, mod_ilbc] Fix build on gcc 12. 2179/head
authorAndrey Volk <andywolk@gmail.com>
Mon, 24 Jul 2023 21:25:53 +0000 (00:25 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 24 Jul 2023 21:25:53 +0000 (00:25 +0300)
src/mod/codecs/mod_ilbc/mod_ilbc.c
src/mod/databases/mod_mariadb/mod_mariadb.c
src/switch_core_media.c
src/switch_utils.c

index 14d67d372e51e2fe2b1ae57ea7b84f713dee195c..2588cdf46b7f1089e5dd3a8c50cfc47f4b4d332f 100644 (file)
@@ -48,7 +48,7 @@ static switch_status_t switch_ilbc_fmtp_parse(const char *fmtp, switch_codec_fmt
 
                memset(codec_fmtp, '\0', sizeof(struct switch_codec_fmtp));
 
-               if (fmtp && (mode = strstr(fmtp, "mode=")) && (mode + 5)) {
+               if (fmtp && (mode = strstr(fmtp, "mode=")) && *(mode + 5)) {
                        codec_ms = atoi(mode + 5);
                }
                if (!codec_ms) {
index 7926ec0c3f52daa86a1565177396fa75408b66b2..5f32e8e90d61c7214993e0963feea28d9235ad1a 100644 (file)
@@ -411,7 +411,7 @@ switch_status_t mariadb_finish_results_real(const char* file, const char* func,
                                if ((status = mysql_next_result(&handle->con))) {
                                        if (status > 0) {
                                                err_str = mariadb_handle_get_error(handle);
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "An error occurred trying to get next for query (%s): %s\n", handle->sql, err_str);
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "An error occurred trying to get next for query (%s): %s\n", handle->sql, switch_str_nil(err_str));
                                                switch_safe_free(err_str);
 
                                                break;
index e75387581d0ef4113a181b62c67bb0f59cb98d6c..0d8670622c36fea4fd19feace4fb2d1006d0b8fc 100644 (file)
@@ -1170,7 +1170,7 @@ static uint32_t parse_lifetime_mki(const char **p, const char *end)
                                        val += ((**p) - '0') * i;
                                }
                                res |= (val & 0x000000ff);                                      /* MKI_SIZE */
-                       } else if (isdigit(*(field_begin + 1)) && (field_begin + 2) && (*(field_begin + 2) == '^') && (field_begin + 3) && isdigit(*(field_begin + 3))) {
+                       } else if (isdigit(*(field_begin + 1)) && (*(field_begin + 2) == '^') && isdigit(*(field_begin + 3))) {
                                res |= (CRYPTO_KEY_MATERIAL_LIFETIME << 24);
                                val = ((uint32_t) (*(field_begin + 1) - '0')) << 8;
                                res |= val;                                                                     /* LIFETIME base. */
index 332137ebdae0ebe1060652ae2e457b0e7d682ef2..7561835e6963c868beb2cc3922bea94c4b261a7a 100644 (file)
@@ -2380,7 +2380,7 @@ SWITCH_DECLARE(int) switch_cmp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *s
                        return (s1->sin_addr.s_addr == s2->sin_addr.s_addr && s1->sin_port == s2->sin_port);
                }
        case AF_INET6:
-               if (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr) {
+               {
                        int i;
 
                        if (!ip_only) {
@@ -2434,7 +2434,7 @@ SWITCH_DECLARE(int) switch_cp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *sa
 
                return 1;
        case AF_INET6:
-               if (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr) {
+               {
                        int i;
 
                        s16->sin6_port = s26->sin6_port;