laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/15039 )

Change subject: Remove undefined param passed to 
{logging,osmo_stats}_vty_add_cmds
......................................................................

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
---
M src/pcu_main.cpp
M src/pcu_vty.c
M src/pcu_vty.h
M tests/edge/EdgeTest.cpp
M tests/emu/pcu_emu.cpp
M tests/llc/LlcTest.cpp
M tests/ms/MsTest.cpp
M tests/tbf/TbfTest.cpp
8 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index fa075cd..21cb244 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -277,7 +277,7 @@
        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 3a733ef..1e4f50c 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -1147,7 +1147,7 @@
        .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 @@
                                                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 a075350..2097561 100644
--- a/src/pcu_vty.h
+++ b/src/pcu_vty.h
@@ -12,7 +12,7 @@
 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 f124b76..3f424d1 100644
--- a/tests/edge/EdgeTest.cpp
+++ b/tests/edge/EdgeTest.cpp
@@ -1411,7 +1411,7 @@
        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 e0190bf..7ecabe1 100644
--- a/tests/emu/pcu_emu.cpp
+++ b/tests/emu/pcu_emu.cpp
@@ -121,7 +121,7 @@
        }

        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 13bda3c..8163f34 100644
--- a/tests/llc/LlcTest.cpp
+++ b/tests/llc/LlcTest.cpp
@@ -229,7 +229,7 @@
        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 4f8f3a0..c74b3a6 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -616,7 +616,7 @@
        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 675cf89..8d1b344 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -3290,7 +3290,7 @@
                                "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();

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15039
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic1ac815eafab49577ff883a5d700ecca5936d216
Gerrit-Change-Number: 15039
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilira...@gmail.com>
Gerrit-Reviewer: laforge <lafo...@gnumonks.org>
Gerrit-MessageType: merged

Reply via email to