Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
b5dbafb9
Commit
b5dbafb9
authored
Jul 07, 2021
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gcc v9 new warnings (address-of-packed-member)
parent
d2190447
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
11 deletions
+24
-11
common/utils/telnetsrv/telnetsrv.c
common/utils/telnetsrv/telnetsrv.c
+4
-3
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+17
-5
openair2/RRC/LTE/rrc_defs.h
openair2/RRC/LTE/rrc_defs.h
+1
-1
No files found.
common/utils/telnetsrv/telnetsrv.c
View file @
b5dbafb9
...
@@ -681,9 +681,6 @@ void run_telnetclt(void) {
...
@@ -681,9 +681,6 @@ void run_telnetclt(void) {
struct
sockaddr_in
name
;
struct
sockaddr_in
name
;
pthread_setname_np
(
pthread_self
(),
"telnetclt"
);
pthread_setname_np
(
pthread_self
(),
"telnetclt"
);
set_sched
(
pthread_self
(),
0
,
telnetparams
.
priority
);
set_sched
(
pthread_self
(),
0
,
telnetparams
.
priority
);
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
sock
<
0
)
fprintf
(
stderr
,
"[TELNETSRV] Error %s on socket call
\n
"
,
strerror
(
errno
));
char
prompt
[
sizeof
(
TELNET_PROMPT_PREFIX
)
+
10
];
char
prompt
[
sizeof
(
TELNET_PROMPT_PREFIX
)
+
10
];
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
NULL
));
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
NULL
));
name
.
sin_family
=
AF_INET
;
name
.
sin_family
=
AF_INET
;
...
@@ -691,6 +688,10 @@ void run_telnetclt(void) {
...
@@ -691,6 +688,10 @@ void run_telnetclt(void) {
inet_aton
(
"127.0.0.1"
,
&
addr
)
;
inet_aton
(
"127.0.0.1"
,
&
addr
)
;
name
.
sin_addr
.
s_addr
=
addr
.
s_addr
;
name
.
sin_addr
.
s_addr
=
addr
.
s_addr
;
name
.
sin_port
=
htons
((
unsigned
short
)(
telnetparams
.
listenport
));
name
.
sin_port
=
htons
((
unsigned
short
)(
telnetparams
.
listenport
));
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
sock
<
0
)
fprintf
(
stderr
,
"[TELNETSRV] Error %s on socket call
\n
"
,
strerror
(
errno
));
if
(
connect
(
sock
,
(
void
*
)
&
name
,
sizeof
(
name
)))
if
(
connect
(
sock
,
(
void
*
)
&
name
,
sizeof
(
name
)))
fprintf
(
stderr
,
"[TELNETSRV] Error %s on connect call
\n
"
,
strerror
(
errno
));
fprintf
(
stderr
,
"[TELNETSRV] Error %s on connect call
\n
"
,
strerror
(
errno
));
...
...
openair2/COMMON/rrc_messages_types.h
View file @
b5dbafb9
...
@@ -417,7 +417,7 @@ typedef struct NRRrcConfigurationReq_s {
...
@@ -417,7 +417,7 @@ typedef struct NRRrcConfigurationReq_s {
// UE: NAS -> RRC messages
// UE: NAS -> RRC messages
typedef
kenb_refresh_req_t
NasKenbRefreshReq
;
typedef
kenb_refresh_req_t
NasKenbRefreshReq
;
typedef
cell_info_req_t
NasCellSelectionReq
;
typedef
cell_info_req_t
NasCellSelectionReq
__attribute__
((
aligned
(
__alignof__
(
char
))
))
;
typedef
nas_establish_req_t
NasConnEstabliReq
;
typedef
nas_establish_req_t
NasConnEstabliReq
;
typedef
ul_info_transfer_req_t
NasUlDataReq
;
typedef
ul_info_transfer_req_t
NasUlDataReq
;
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
b5dbafb9
...
@@ -483,7 +483,7 @@ typedef struct {
...
@@ -483,7 +483,7 @@ typedef struct {
uint8_t
status
;
uint8_t
status
;
PC5SignallingMessage
pc5_signalling_message
;
PC5SignallingMessage
pc5_signalling_message
;
}
pc5sPrimitive
;
}
pc5sPrimitive
;
}
__attribute__
((
__packed__
))
sidelink_pc5s_element
;
}
__attribute__
((
__packed__
,
aligned
(
__alignof__
(
char
))
))
sidelink_pc5s_element
;
/*
/*
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
b5dbafb9
...
@@ -603,7 +603,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
...
@@ -603,7 +603,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
//int optval;
//int optval;
int
bytes_received
;
int
bytes_received
;
sidelink_pc5s_element
*
sl_pc5s_msg_send
=
NULL
;
sidelink_pc5s_element
*
sl_pc5s_msg_send
=
NULL
;
pc5s_header_t
*
pc5s_header
=
NULL
;
pc5s_header_t
*
pc5s_header
=
NULL
;
rb_id_t
rab_id
=
0
;
rb_id_t
rab_id
=
0
;
//TTN for D2D (PC5S)
//TTN for D2D (PC5S)
// receive a message from ProSe App
// receive a message from ProSe App
...
@@ -704,6 +704,12 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
...
@@ -704,6 +704,12 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
pc5s_header
->
rb_id
,
pc5s_header
->
rb_id
,
rab_id
,
rab_id
,
pc5s_header
->
data_size
);
pc5s_header
->
data_size
);
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
* gcc, from v9, now warns about it. fix these warnings by using local variables
*/
uint32_t
sourceL2Id
=
pc5s_header
->
sourceL2Id
;
uint32_t
destinationL2Id
=
pc5s_header
->
destinationL2Id
;
pdcp_data_req
(
pdcp_data_req
(
&
ctxt
,
&
ctxt
,
SRB_FLAG_NO
,
SRB_FLAG_NO
,
...
@@ -713,8 +719,8 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
...
@@ -713,8 +719,8 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
pc5s_header
->
data_size
,
pc5s_header
->
data_size
,
(
unsigned
char
*
)
receive_buf
,
(
unsigned
char
*
)
receive_buf
,
PDCP_TRANSMISSION_MODE_DATA
,
PDCP_TRANSMISSION_MODE_DATA
,
&
pc5s_header
->
sourceL2Id
,
&
sourceL2Id
,
&
pc5s_header
->
destinationL2Id
&
destinationL2Id
);
);
}
else
{
/* else of h_rc == HASH_TABLE_OK */
}
else
{
/* else of h_rc == HASH_TABLE_OK */
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_LOG_RX_DISCARDED_MESSAGE
(
...
@@ -759,6 +765,12 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
...
@@ -759,6 +765,12 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
pc5s_header
->
rb_id
,
pc5s_header
->
rb_id
,
DEFAULT_RAB_ID
,
DEFAULT_RAB_ID
,
pc5s_header
->
data_size
);
pc5s_header
->
data_size
);
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
* gcc, from v9, now warns about it. fix these warnings by using local variables
*/
uint32_t
sourceL2Id
=
pc5s_header
->
sourceL2Id
;
uint32_t
destinationL2Id
=
pc5s_header
->
destinationL2Id
;
pdcp_data_req
(
pdcp_data_req
(
&
ctxt
,
&
ctxt
,
SRB_FLAG_NO
,
SRB_FLAG_NO
,
...
@@ -768,8 +780,8 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
...
@@ -768,8 +780,8 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
pc5s_header
->
data_size
,
pc5s_header
->
data_size
,
(
unsigned
char
*
)
receive_buf
,
(
unsigned
char
*
)
receive_buf
,
PDCP_TRANSMISSION_MODE_DATA
,
PDCP_TRANSMISSION_MODE_DATA
,
&
pc5s_header
->
sourceL2Id
,
&
sourceL2Id
,
&
pc5s_header
->
destinationL2Id
&
destinationL2Id
);
);
}
}
}
/* end of !ctxt.enb_flag */
}
/* end of !ctxt.enb_flag */
...
...
openair2/RRC/LTE/rrc_defs.h
View file @
b5dbafb9
...
@@ -376,7 +376,7 @@ typedef struct UE_RRC_INFO_s {
...
@@ -376,7 +376,7 @@ typedef struct UE_RRC_INFO_s {
uint32_t
N310_cnt
;
uint32_t
N310_cnt
;
uint32_t
N311_cnt
;
uint32_t
N311_cnt
;
rnti_t
rnti
;
rnti_t
rnti
;
}
__attribute__
((
__packed__
))
__attribute__
((
aligned
(
1
)))
UE_RRC_INFO
;
}
__attribute__
((
__packed__
))
UE_RRC_INFO
;
typedef
struct
UE_S_TMSI_s
{
typedef
struct
UE_S_TMSI_s
{
boolean_t
presence
;
boolean_t
presence
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment