Commit 2b22daa4 authored by zhenghuangkun's avatar zhenghuangkun

Fix Warning

parent 5dc6712c
......@@ -471,10 +471,11 @@ static int ngap_gNB_generate_ng_setup_request(
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.present = NGAP_GNB_ID_PR_gNB_ID;
MACRO_GNB_ID_TO_BIT_STRING(instance_p->gNB_id,
&ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID);
NGAP_INFO("%d -> %02x%02x%02x\n", instance_p->gNB_id,
NGAP_INFO("%u -> %02x%02x%02x%02x\n", instance_p->gNB_id,
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[0],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[1],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[2]);
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[2],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[3]);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */
......
......@@ -245,7 +245,7 @@ typedef struct ngap_gNB_instance_s {
* In our case the gNB is a macro gNB so the id will be 20 bits long.
* For Home gNB id, this field should be 36 bits long.
*/
uint64_t gNB_id;
uint32_t gNB_id;
/* The type of the cell */
enum cell_type_e cell_type;
......
......@@ -334,7 +334,7 @@ int ngap_gNB_handle_ng_setup_response(uint32_t assoc_id,
for (i = 0; i < ie->value.choice.ServedGUAMIList.list.count; i++) {
NGAP_ServedGUAMIItem_t *guami_item_p;
struct served_guami_s *new_guami_p;
int j;
guami_item_p = ie->value.choice.ServedGUAMIList.list.array[i];
new_guami_p = calloc(1, sizeof(struct served_guami_s));
STAILQ_INIT(&new_guami_p->served_plmns);
......@@ -1008,7 +1008,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id,
break;
default:
NGAP_ERROR("could not found protocolIEs id %d\n", pdusessionTransfer_ies->id);
NGAP_ERROR("could not found protocolIEs id %ld\n", pdusessionTransfer_ies->id);
return -1;
}
}
......
......@@ -508,9 +508,9 @@ do { \
do { \
(bITsTRING)->buf = calloc(4, sizeof(uint8_t)); \
(bITsTRING)->buf[0] = ((mACRO) >> 20); \
(bITsTRING)->buf[1] = (mACRO) >> 12; \
(bITsTRING)->buf[3] = (mACRO) >> 4; \
(bITsTRING)->buf[4] = ((mACRO) & 0x0f) << 4; \
(bITsTRING)->buf[1] = (mACRO) >> 12; \
(bITsTRING)->buf[2] = (mACRO) >> 4; \
(bITsTRING)->buf[3] = ((mACRO) & 0x0f) << 4; \
(bITsTRING)->size = 4; \
(bITsTRING)->bits_unused = 4; \
} while(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment