From cd2ac56bd4f6cb783c2f826686a0809d7d2327f3 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 5 Aug 2019 14:30:44 +0200 Subject: Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Related: OS#4138 Change-Id: Ic1ac815eafab49577ff883a5d700ecca5936d216 --- src/pcu_main.cpp | 2 +- src/pcu_vty.c | 6 +++--- src/pcu_vty.h | 2 +- tests/edge/EdgeTest.cpp | 2 +- tests/emu/pcu_emu.cpp | 2 +- tests/llc/LlcTest.cpp | 2 +- tests/ms/MsTest.cpp | 2 +- tests/tbf/TbfTest.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index fa075cdf..21cb2441 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -277,7 +277,7 @@ int main(int argc, char *argv[]) bssgp_set_log_ss(DBSSGP); vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); handle_options(argc, argv); if ((!!spoof_mcc) + (!!spoof_mnc) == 1) { diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 3a733ef8..1e4f50c2 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1147,7 +1147,7 @@ struct vty_app_info pcu_vty_info = { .is_config_node = pcu_vty_is_config_node, }; -int pcu_vty_init(const struct log_info *cat) +int pcu_vty_init(void) { // install_element_ve(&show_pcu_cmd); @@ -1164,8 +1164,8 @@ int pcu_vty_init(const struct log_info *cat) NO_STR "GSMTAP Category\n", "\n", "", 0); - logging_vty_add_cmds(cat); - osmo_stats_vty_add_cmds(cat); + logging_vty_add_cmds(); + osmo_stats_vty_add_cmds(); install_node(&pcu_node, config_write_pcu); install_element(CONFIG_NODE, &cfg_pcu_cmd); diff --git a/src/pcu_vty.h b/src/pcu_vty.h index a0753501..20975612 100644 --- a/src/pcu_vty.h +++ b/src/pcu_vty.h @@ -12,7 +12,7 @@ enum pcu_vty_node { int pcu_vty_go_parent(struct vty *vty); int pcu_vty_is_config_node(struct vty *vty, int node); -int pcu_vty_init(const struct log_info *cat); +int pcu_vty_init(); extern struct vty_app_info pcu_vty_info; diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp index f124b76f..3f424d16 100644 --- a/tests/edge/EdgeTest.cpp +++ b/tests/edge/EdgeTest.cpp @@ -1411,7 +1411,7 @@ int main(int argc, char **argv) log_set_print_filename(osmo_stderr_target, 0); vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); test_coding_scheme(); test_rlc_info_init(); diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp index e0190bfb..7ecabe12 100644 --- a/tests/emu/pcu_emu.cpp +++ b/tests/emu/pcu_emu.cpp @@ -121,7 +121,7 @@ int main(int argc, char **argv) } vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); current_test = 0; diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp index 13bda3cc..8163f34e 100644 --- a/tests/llc/LlcTest.cpp +++ b/tests/llc/LlcTest.cpp @@ -229,7 +229,7 @@ int main(int argc, char **argv) log_parse_category_mask(osmo_stderr_target, "DPCU,3:DLGLOBAL,1:"); vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); test_llc_queue(); test_llc_meta(); diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 4f8f3a00..c74b3a65 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -616,7 +616,7 @@ int main(int argc, char **argv) log_parse_category_mask(osmo_stderr_target, "DPCU,3:DRLCMAC,3"); vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); test_ms_state(); test_ms_callback(); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 675cf898..8d1b3448 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -3290,7 +3290,7 @@ int main(int argc, char **argv) "DL1IF,6:DTBF,1:DTBFUL,1:DTBFDL,1:DLGLOBAL,2:"); vty_init(&pcu_vty_info); - pcu_vty_init(&gprs_log_info); + pcu_vty_init(); test_tbf_base(); test_tbf_tlli_update(); -- cgit v1.2.3