vty: Fix misusage of snprintf in vty/utils.c
Compiled with ubuntu 1204 (precise), where -Wformat-security is enabled by
-Wall.
Test yields ok, but the current implementation doesn't properly support
multi-character separators and end strings. So the test output is truncated.
Addresses:
utils.c: In function 'vty_cmd_string_from_valstr':
utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e5fc718..ecb2b6c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,8 @@
conv/conv_test auth/milenage_test lapd/lapd_test \
gsm0808/gsm0808_test gsm0408/gsm0408_test \
gb/bssgp_fc_test logging/logging_test fr/fr_test \
- loggingrb/loggingrb_test strrb/strrb_test
+ loggingrb/loggingrb_test strrb/strrb_test \
+ vty/vty_test
if ENABLE_MSGFILE
check_PROGRAMS += msgfile/msgfile_test
@@ -62,6 +63,9 @@
strrb_strrb_test_SOURCES = strrb/strrb_test.c
strrb_strrb_test_LDADD = $(top_builddir)/src/libosmocore.la
+vty_vty_test_SOURCES = vty/vty_test.c
+vty_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(top_builddir)/src/libosmocore.la
+
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
@@ -91,7 +95,8 @@
msgfile/msgfile_test.ok msgfile/msgconfig.cfg \
logging/logging_test.ok logging/logging_test.err \
fr/fr_test.ok loggingrb/logging_test.ok \
- loggingrb/logging_test.err strrb/strrb_test.ok
+ loggingrb/logging_test.err strrb/strrb_test.ok \
+ vty/vty_test.ok
DISTCLEANFILES = atconfig