mirror of
https://gerrit.osmocom.org/osmo-gbproxy
synced 2024-08-18 00:46:23 +00:00
[abis_nm] avoid integer-to-pointer casting and associated gcc warnings
This commit is contained in:
parent
0101b81d31
commit
6a21c732e3
3 changed files with 12 additions and 6 deletions
|
@ -1036,7 +1036,7 @@ static int abis_nm_rcvmsg_fom(struct msgb *mb)
|
|||
else
|
||||
DEBUGPC(DNM, "\n");
|
||||
|
||||
dispatch_signal(SS_NM, S_NM_NACK, (void*) ((long)mt));
|
||||
dispatch_signal(SS_NM, S_NM_NACK, (void*) &mt);
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
|
@ -2601,7 +2601,7 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
|
|||
case NM_MT_IPACC_RSL_CONNECT_NACK:
|
||||
case NM_MT_IPACC_SET_NVATTR_NACK:
|
||||
case NM_MT_IPACC_GET_NVATTR_NACK:
|
||||
dispatch_signal(SS_NM, S_NM_IPACC_NACK, (void*) ((long)foh->msg_type));
|
||||
dispatch_signal(SS_NM, S_NM_IPACC_NACK, &foh->msg_type);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -443,7 +443,7 @@ static int sw_activ_rep(struct msgb *mb)
|
|||
}
|
||||
|
||||
/* Callback function for NACK on the OML NM */
|
||||
static int oml_msg_nack(int mt)
|
||||
static int oml_msg_nack(u_int8_t mt)
|
||||
{
|
||||
if (mt == NM_MT_SET_BTS_ATTR_NACK) {
|
||||
fprintf(stderr, "Failed to set BTS attributes. That is fatal. "
|
||||
|
@ -458,11 +458,14 @@ static int oml_msg_nack(int mt)
|
|||
static int nm_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
void *handler_data, void *signal_data)
|
||||
{
|
||||
u_int8_t *msg_type;
|
||||
|
||||
switch (signal) {
|
||||
case S_NM_SW_ACTIV_REP:
|
||||
return sw_activ_rep(signal_data);
|
||||
case S_NM_NACK:
|
||||
return oml_msg_nack((int)signal_data);
|
||||
msg_type = signal_data;
|
||||
return oml_msg_nack(*msg_type);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ static u_int8_t unit_id_attr[] = { 0x91, 0x00, 9, '2', '3', '4', '2', '/' , '0',
|
|||
* result. The nanoBTS will send us a NACK when we did something the
|
||||
* BTS didn't like.
|
||||
*/
|
||||
static int ipacc_msg_nack(int mt)
|
||||
static int ipacc_msg_nack(u_int8_t mt)
|
||||
{
|
||||
fprintf(stderr, "Failure to set attribute. This seems fatal\n");
|
||||
exit(-1);
|
||||
|
@ -149,9 +149,12 @@ static int test_rep(void *_msg)
|
|||
static int nm_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
void *handler_data, void *signal_data)
|
||||
{
|
||||
u_int8_t *msg_type;
|
||||
|
||||
switch (signal) {
|
||||
case S_NM_IPACC_NACK:
|
||||
return ipacc_msg_nack((int)signal_data);
|
||||
msg_type = signal_data;
|
||||
return ipacc_msg_nack(*msg_type);
|
||||
case S_NM_TEST_REP:
|
||||
return test_rep(signal_data);
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue