[MERGED] osmocom-bb[master]: VIRT-PHY: Fix all compiler warnings on gcc-6.3.0

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jul 12 21:48:52 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: VIRT-PHY: Fix all compiler warnings on gcc-6.3.0
......................................................................


VIRT-PHY: Fix all compiler warnings on gcc-6.3.0

Change-Id: I95b93ec907fbfd180a0f2ac681dd63791ede24db
---
M src/host/virt_phy/include/virtphy/logging.h
M src/host/virt_phy/src/l1ctl_sock.c
M src/host/virt_phy/src/logging.c
M src/host/virt_phy/src/virt_prim_data.c
M src/host/virt_phy/src/virt_prim_rach.c
M src/host/virt_phy/src/virt_prim_traffic.c
6 files changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/virt_phy/include/virtphy/logging.h b/src/host/virt_phy/include/virtphy/logging.h
index 87f12f7..6ca2525 100644
--- a/src/host/virt_phy/include/virtphy/logging.h
+++ b/src/host/virt_phy/include/virtphy/logging.h
@@ -8,4 +8,4 @@
 extern const struct log_info ms_log_info;
 
 int ms_log_init(char *cat_mask);
-char *getL1ctlPrimName(uint8_t type);
+const char *getL1ctlPrimName(uint8_t type);
diff --git a/src/host/virt_phy/src/l1ctl_sock.c b/src/host/virt_phy/src/l1ctl_sock.c
index e136aa8..2e16bfa 100644
--- a/src/host/virt_phy/src/l1ctl_sock.c
+++ b/src/host/virt_phy/src/l1ctl_sock.c
@@ -86,7 +86,7 @@
 	if (rc == len) {
 		msgb_put(msg, rc);
 		l1h = (void *) msgb_data(msg);
-		msg->l1h = l1h;
+		msg->l1h = (void *) l1h;
 		lsi->recv_cb(lsi, msg);
 		return 0;
 	}
diff --git a/src/host/virt_phy/src/logging.c b/src/host/virt_phy/src/logging.c
index 097bf35..7801bec 100644
--- a/src/host/virt_phy/src/logging.c
+++ b/src/host/virt_phy/src/logging.c
@@ -25,7 +25,7 @@
 #include <osmocom/core/application.h>
 #include <virtphy/logging.h>
 
-const char* l1ctlPrimNames[] = {
+static const char* l1ctlPrimNames[] = {
         "_L1CTL_NONE",
         "L1CTL_FBSB_REQ",
         "L1CTL_FBSB_CONF",
@@ -105,7 +105,7 @@
 	return 0;
 }
 
-char *getL1ctlPrimName(uint8_t type)
+const char *getL1ctlPrimName(uint8_t type)
 {
 	return l1ctlPrimNames[type];
 }
diff --git a/src/host/virt_phy/src/virt_prim_data.c b/src/host/virt_phy/src/virt_prim_data.c
index 226078c..8b65d6d 100644
--- a/src/host/virt_phy/src/virt_prim_data.c
+++ b/src/host/virt_phy/src/virt_prim_data.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include <osmocom/gsm/rsl.h>
 #include <osmocom/gsm/gsm_utils.h>
 #include <osmocom/gsm/protocol/gsm_08_58.h>
 #include <osmocom/core/msgb.h>
diff --git a/src/host/virt_phy/src/virt_prim_rach.c b/src/host/virt_phy/src/virt_prim_rach.c
index 0bda7e9..1642ac6 100644
--- a/src/host/virt_phy/src/virt_prim_rach.c
+++ b/src/host/virt_phy/src/virt_prim_rach.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include <osmocom/gsm/rsl.h>
 #include <osmocom/gsm/gsm_utils.h>
 #include <osmocom/gsm/protocol/gsm_08_58.h>
 #include <osmocom/core/msgb.h>
diff --git a/src/host/virt_phy/src/virt_prim_traffic.c b/src/host/virt_phy/src/virt_prim_traffic.c
index 0e02153..50e6857 100644
--- a/src/host/virt_phy/src/virt_prim_traffic.c
+++ b/src/host/virt_phy/src/virt_prim_traffic.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include <osmocom/gsm/rsl.h>
 #include <osmocom/gsm/gsm_utils.h>
 #include <osmocom/gsm/protocol/gsm_08_58.h>
 #include <osmocom/core/msgb.h>

-- 
To view, visit https://gerrit.osmocom.org/3219
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I95b93ec907fbfd180a0f2ac681dd63791ede24db
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list