]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_skinny, mod_cdr_mongodb, mod_rayo] Fix Debian 11 build warnings.
authorAndrey Volk <andywolk@gmail.com>
Wed, 22 Sep 2021 17:14:53 +0000 (20:14 +0300)
committerAndrey Volk <andywolk@gmail.com>
Thu, 14 Oct 2021 20:29:06 +0000 (23:29 +0300)
src/mod/endpoints/mod_skinny/mod_skinny.c
src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c
src/mod/event_handlers/mod_rayo/Makefile.am

index 0274912ad2525563b0972aa3aa3f0e1932a166eb..3df1290047d87337a8f51a86b2bcba580f6e66ca 100644 (file)
@@ -2414,7 +2414,7 @@ static switch_status_t load_skinny_config(void)
                                                                char *val = (char *) switch_xml_attr_soft(param, "value");
 
                                                                if (!strcasecmp(var, "firmware-version")) {
-                                                                       strncpy(params->firmware_version, val, 16);
+                                                                       snprintf(params->firmware_version, 16, "%s", val);
                                                                }
                                                        } /* param */
                                                        switch_core_hash_insert(profile->device_type_params_hash, id_str, params);
index 77870b3dc22abb1fa455295b78705540367b0118..19110f2e668a28dcf15e210990dacf2a63b3e88a 100644 (file)
@@ -438,7 +438,7 @@ static void mongo_replset_add_node( mongo_host_port **list, const char *host, in
     mongo_host_port *host_port = bson_malloc( sizeof( mongo_host_port ) );
     host_port->port = port;
     host_port->next = NULL;
-    strncpy( host_port->host, host, sizeof(host_port->host) - 1 );
+    snprintf(host_port->host, sizeof(host_port->host), "%s", host);
 
     if( *list == NULL )
         *list = host_port;
index f2b71780945c1e88cab7eaa02b87863ad9072b3f..a9ca95d51b1beb141671cb2fe6d823b3c3f305af 100644 (file)
@@ -27,17 +27,17 @@ noinst_PROGRAMS = test/test_iks test/test_nlsml test/test_srgs
 test_test_iks_SOURCES = test/test_iks.c
 test_test_iks_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
 test_test_iks_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_iks_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
+test_test_iks_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
 
 test_test_nlsml_SOURCES = test/test_nlsml.c
 test_test_nlsml_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
 test_test_nlsml_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_nlsml_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
+test_test_nlsml_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
 
 test_test_srgs_SOURCES = test/test_srgs.c
 test_test_srgs_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
 test_test_srgs_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_srgs_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
+test_test_srgs_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
 
 
 TESTS = $(noinst_PROGRAMS)