aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-22 11:13:54 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-06-22 11:26:34 +0200
commitba3fa11ae2c2e48964deb013547b61a22670beb9 (patch)
tree48643c29a3dbda7d450514de651b736d3176bb85 /src/osmo-bts-sysmo/l1_if.c
parent5fd4aaaebb13ca80fb0184a8dac9af0059512005 (diff)
sysmo: Fix memcmp in RF-MUTE.req for superfemto < 3.6.0
Fixes following compilation warning: In file included from l1_if.c:32:0: l1_if.c: In function ‘l1if_mute_rf’: /include/osmocom/core/utils.h:13:30: error: ‘sizeof’ on array function parameter ‘mute’ will return size of ‘uint8_t * {aka unsigned char *}’ [-Werror=sizeof-array-argument] #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ^ l1_if.c:1405:29: note: in expansion of macro ‘ARRAY_SIZE’ if (!memcmp(mute, unmuted, ARRAY_SIZE(mute))) { ^~~~~~~~~~ l1_if.c:1388:51: note: declared here int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb) ^~~~ In file included from l1_if.c:32:0: /include/osmocom/core/utils.h:13:30: error: ‘sizeof’ on array function parameter ‘mute’ will return size of ‘uint8_t * {aka unsigned char *}’ [-Werror=sizeof-array-argument] #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ^ l1_if.c:1408:19: note: in expansion of macro ‘ARRAY_SIZE’ for (i = 0; i < ARRAY_SIZE(mute); ++i) ^~~~~~~~~~ l1_if.c:1388:51: note: declared here int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb) ^~~~ Change-Id: Id040aeb35549ddb75072942be0093064a89092a6
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index f1c6602c..7fa82f2b 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1402,10 +1402,10 @@ int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb)
LOGP(DL1C, LOGL_ERROR, "RF-MUTE.req not supported by SuperFemto\n");
msgb_free(msg);
/* always acknowledge an un-MUTE (which is a no-op if MUTE is not supported */
- if (!memcmp(mute, unmuted, ARRAY_SIZE(mute))) {
+ if (!memcmp(mute, unmuted, ARRAY_SIZE(unmuted))) {
bts_update_status(BTS_STATUS_RF_MUTE, mute[0]);
oml_mo_rf_lock_chg(&trx->mo, mute, 1);
- for (i = 0; i < ARRAY_SIZE(mute); ++i)
+ for (i = 0; i < ARRAY_SIZE(unmuted); ++i)
mute_handle_ts(&trx->ts[i], mute[i]);
return 0;
}