Commit 8d072754 authored by Robert Schmidt's avatar Robert Schmidt

Write-only variable: suppress warning, as we decode NAS message

parent 852a6c4f
...@@ -986,6 +986,7 @@ static int _nas_message_decrypt( ...@@ -986,6 +986,7 @@ static int _nas_message_decrypt(
length, security_header_type); length, security_header_type);
memcpy(dest, src, length); memcpy(dest, src, length);
DECODE_U8(dest, *(uint8_t*)(&header), size); 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 (header.protocol_discriminator);
//LOG_FUNC_RETURN (length); //LOG_FUNC_RETURN (length);
break; break;
...@@ -1022,6 +1023,7 @@ static int _nas_message_decrypt( ...@@ -1022,6 +1023,7 @@ static int _nas_message_decrypt(
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); 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 (header.protocol_discriminator);
...@@ -1056,6 +1058,7 @@ static int _nas_message_decrypt( ...@@ -1056,6 +1058,7 @@ static int _nas_message_decrypt(
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); 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 (header.protocol_discriminator);
} }
...@@ -1071,6 +1074,7 @@ static int _nas_message_decrypt( ...@@ -1071,6 +1074,7 @@ static int _nas_message_decrypt(
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); 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 (header.protocol_discriminator);
...@@ -1084,6 +1088,7 @@ static int _nas_message_decrypt( ...@@ -1084,6 +1088,7 @@ static int _nas_message_decrypt(
/* Decode the first octet (security header type or EPS bearer identity, /* Decode the first octet (security header type or EPS bearer identity,
* and protocol discriminator) */ * and protocol discriminator) */
DECODE_U8(dest, *(uint8_t*)(&header), size); 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 (header.protocol_discriminator);
break; break;
......
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