From 8d07275496dbb11495679ed813fb31cdc2fabeeb Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 28 Mar 2023 11:09:41 +0200 Subject: [PATCH] Write-only variable: suppress warning, as we decode NAS message --- openair3/NAS/COMMON/API/NETWORK/nas_message.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair3/NAS/COMMON/API/NETWORK/nas_message.c b/openair3/NAS/COMMON/API/NETWORK/nas_message.c index d1a9e97025..02fa4ad6ca 100644 --- a/openair3/NAS/COMMON/API/NETWORK/nas_message.c +++ b/openair3/NAS/COMMON/API/NETWORK/nas_message.c @@ -986,6 +986,7 @@ static int _nas_message_decrypt( length, security_header_type); memcpy(dest, src, length); DECODE_U8(dest, *(uint8_t*)(&header), size); + (void) size; // prevent warning of unused variable, but we have to decode it LOG_FUNC_RETURN (header.protocol_discriminator); //LOG_FUNC_RETURN (length); break; @@ -1022,6 +1023,7 @@ static int _nas_message_decrypt( /* Decode the first octet (security header type or EPS bearer identity, * and protocol discriminator) */ DECODE_U8(dest, *(uint8_t*)(&header), size); + (void) size; // prevent warning of unused variable, but we have to decode it LOG_FUNC_RETURN (header.protocol_discriminator); @@ -1056,6 +1058,7 @@ static int _nas_message_decrypt( /* Decode the first octet (security header type or EPS bearer identity, * and protocol discriminator) */ DECODE_U8(dest, *(uint8_t*)(&header), size); + (void) size; // prevent warning of unused variable, but we have to decode it LOG_FUNC_RETURN (header.protocol_discriminator); } @@ -1071,6 +1074,7 @@ static int _nas_message_decrypt( /* Decode the first octet (security header type or EPS bearer identity, * and protocol discriminator) */ DECODE_U8(dest, *(uint8_t*)(&header), size); + (void) size; // prevent warning of unused variable, but we have to decode it LOG_FUNC_RETURN (header.protocol_discriminator); @@ -1084,6 +1088,7 @@ static int _nas_message_decrypt( /* Decode the first octet (security header type or EPS bearer identity, * and protocol discriminator) */ DECODE_U8(dest, *(uint8_t*)(&header), size); + (void) size; // prevent warning of unused variable, but we have to decode it LOG_FUNC_RETURN (header.protocol_discriminator); break;