summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetar Dimoski <petar.dimoski@seavus.com>2012-01-25 15:16:39 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:43:12 +0200
commit10184ae5b432f3dd7e014afb9a8f0ea0cd880e26 (patch)
tree135e6fba0d83cbae52db8cd2fbb3ff0c9a494f44
parenta08c80408fca5875a895747e0ea6dc1aca29df18 (diff)
Clean up astyle and coverity errors
ST-Ericsson ID: 410188 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/45297 Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
-rw-r--r--Makefile5
-rw-r--r--lcmodule/source/LCM.rc6
-rw-r--r--lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c3
-rw-r--r--lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c56
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c2
-rw-r--r--source/LCDriver.rc6
-rw-r--r--source/LCDriverMethods.cpp4
-rw-r--r--source/LCM/Hash.cpp32
-rw-r--r--source/LcdVersion.cpp6
-rw-r--r--source/LcmInterface.cpp7
-rw-r--r--source/api_wrappers/linux/CThreadWrapper.cpp2
-rw-r--r--source/api_wrappers/linux/CThreadWrapper.h2
-rw-r--r--source/config/a2_commands_marshal_cpp.xsl1
-rw-r--r--source/config/commands_marshal_cpp.xsl1
-rw-r--r--source/security_algorithms/sha/sha2.cpp8
15 files changed, 78 insertions, 63 deletions
diff --git a/Makefile b/Makefile
index 534681f..7ee4887 100644
--- a/Makefile
+++ b/Makefile
@@ -335,3 +335,8 @@ coverity:
@cov-commit-defects --datadir $(COV_DATA_DIR) --product lcd --user admin --dir $(COV_INTER_DATA_DIR)
@cov-start-gui --datadir $(COV_DATA_DIR) --port 1122
echo Go to localhost port 1122 in webbrowser and login with username admin and password admin to review result
+
+astyle:
+ astyle --style=k/r --indent=spaces --break-blocks --convert-tabs --add-brackets \
+ --unpad-paren --pad-header --pad-oper --indent-col1-comments --align-pointer=name \
+ -R "*.h" -R "*.c" -R "*.cpp"
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc
index 2652e31..f943863 100644
--- a/lcmodule/source/LCM.rc
+++ b/lcmodule/source/LCM.rc
@@ -69,15 +69,15 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "Build date: 2012-01-23"
+ VALUE "Comments", "Build date: 2012-01-25"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCM Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Loader Communication Module"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: I2737059dcca62d769ca1876a4859f7c468fcfdd9"
+ VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "P1Y"
+ VALUE "ProductVersion", "P2Y"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c
index 9e20d59..feff254 100644
--- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c
+++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c
@@ -876,6 +876,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect
#ifndef CFG_ENABLE_LOADER_TYPE
//TODO find end release timer for retransmission
BulkVector_p->State = PROCESSING_CHUNKS;
+ /* coverity[fallthrough] */
#else
//...
break;
@@ -1027,7 +1028,9 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect
}
}
+#ifndef CFG_ENABLE_LOADER_TYPE
ErrExit:
+#endif
Do_CriticalSection_Leave(R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS);
return ReturnValue;
diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c
index c8347bf..e5afef2 100644
--- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c
+++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c
@@ -226,9 +226,9 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p)
#ifdef CFG_ENABLE_LOADER_TYPE
if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read(
- In_p->Target_p + ReqBufferOffset + In_p->RecBackupData,
- ReqData - In_p->RecBackupData, R15_Network_ReadCallback,
- Communication_p->CommunicationDevice_p)) {
+ In_p->Target_p + ReqBufferOffset + In_p->RecBackupData,
+ ReqData - In_p->RecBackupData, R15_Network_ReadCallback,
+ Communication_p->CommunicationDevice_p)) {
/* Read failed! Return to previous state. */
In_p->ReqData = ReqData;
In_p->ReqBuffOffset = ReqBufferOffset;
@@ -271,8 +271,8 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p)
#ifdef CFG_ENABLE_LOADER_TYPE
if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read(
- In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback,
- Communication_p->CommunicationDevice_p)) {
+ In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback,
+ Communication_p->CommunicationDevice_p)) {
/* Read failed! Return to previous state. */
In_p->ReqData = ReqData;
In_p->ReqBuffOffset = ReqBufferOffset;
@@ -294,15 +294,15 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p)
#ifdef CFG_ENABLE_LOADER_TYPE
if (E_SUCCESS == Communication_p->CommunicationDevice_p->Read(In_p->Target_p,
- ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback,
- Communication_p->CommunicationDevice_p)) {
+ ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback,
+ Communication_p->CommunicationDevice_p)) {
In_p->State = RECEIVE_HEADER;
}
#else
(void)Communication_p->CommunicationDevice_p->Read(In_p->Target_p,
- ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback,
- Communication_p->CommunicationDevice_p);
+ ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback,
+ Communication_p->CommunicationDevice_p);
In_p->State = RECEIVE_HEADER;
#endif
}
@@ -314,9 +314,11 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
{
ErrorCode_e ReturnValue = E_SUCCESS;
R15_Outbound_t *Out_p = &(R15_NETWORK(Communication_p)->Outbound);
- uint8 *HeaderStartInBuffer_p = NULL;
uint8 *ExHeaderStartInBuffer_p = NULL;
+#ifdef CFG_ENABLE_LOADER_TYPE
+ uint8 *HeaderStartInBuffer_p = NULL;
boolean IsBufferContinuous = FALSE;
+#endif
uint32 ContinuousBufferLength = 0;
boolean RegisterRetransmission = FALSE;
uint32 ExtHdrLen = 0;
@@ -344,9 +346,8 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
/* FALLTHROUGH */
case SEND_HEADER:
- HeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER;
-
#ifdef CFG_ENABLE_LOADER_TYPE
+ HeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER;
if (Out_p->Packet_p->Header.ExtendedHeaderLength == COMMAND_EXTENDED_HEADER_LENGTH) {
ExtHdrLen = ALIGNED_COMMAND_EXTENDED_HEADER_LENGTH;
@@ -377,10 +378,11 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
#else
ContinuousBufferLength = ALIGNED_HEADER_LENGTH;
Out_p->State = SENDING_HEADER;
+
#endif
if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write((Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER),
- ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
+ ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
C_(printf("r15_network_layer.c (%d) Header Sent to comm device! \n", __LINE__);)
} else {
Out_p->State = SEND_HEADER;
@@ -412,7 +414,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
}
if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(ExHeaderStartInBuffer_p, ExtHdrLen,
- R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
+ R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
C_(printf("r15_network_layer.c (%d) ExHeader Sent to comm device! \n", __LINE__);)
} else {
Out_p->State = SEND_EX_HEADER;
@@ -432,8 +434,8 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p)
Aligned_Length = (Out_p->Packet_p->Header.PayloadLength + (ALIGN_SIZE - 1)) & (~(ALIGN_SIZE - 1));
if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(Out_p->Packet_p->Payload_p,
- Aligned_Length,
- R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
+ Aligned_Length,
+ R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) {
RegisterRetransmission = TRUE;
C_(printf("r15_network_layer.c (%d) Payload Sent to comm device! \n", __LINE__);)
} else {
@@ -756,12 +758,12 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat
R15_DeserializeBulkExtendedHeader(&BulkExtendedHeader, In_p->Target_p);
IsValidHeader = R15_IsValidExtendedHeader(In_p->Target_p,
- In_p->Header.ExtendedHeaderLength,
- In_p->Header.ExtendedHeaderChecksum);
+ In_p->Header.ExtendedHeaderLength,
+ In_p->Header.ExtendedHeaderChecksum);
if (IsValidHeader) {
if (R15Header.Protocol == BULK_PROTOCOL &&
- (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) {
+ (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) {
In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, BULK_BUFFER_SIZE);
} else {
In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, COMMAND_BUFFER_SIZE);
@@ -802,10 +804,10 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat
memcpy(Packet_p->Hash, &Packet_p->Header.PayloadChecksum, 4);
Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p),
- HASH_NONE,
- Packet_p->Payload_p, Packet_p->Header.PayloadLength,
- Packet_p->Hash, (HashCallback_t)R15_InHashCallback,
- (void *)Packet_p);
+ HASH_NONE,
+ Packet_p->Payload_p, Packet_p->Header.PayloadLength,
+ Packet_p->Hash, (HashCallback_t)R15_InHashCallback,
+ (void *)Packet_p);
#endif
In_p->Packet_p = NULL;
@@ -857,10 +859,10 @@ static ErrorCode_e R15_Network_ReceivePayload(Communication_t *Communication_p)
#endif
Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p),
- Communication_p->CurrentFamilyHash,
- Packet_p->Payload_p, Packet_p->Header.PayloadLength,
- Packet_p->Hash, (HashCallback_t)R15_InHashCallback,
- (void *)Packet_p);
+ Communication_p->CurrentFamilyHash,
+ Packet_p->Payload_p, Packet_p->Header.PayloadLength,
+ Packet_p->Hash, (HashCallback_t)R15_InHashCallback,
+ (void *)Packet_p);
} else {
SET_PACKET_FLAGS(Packet_p, PACKET_RX_STATE_MASK, BUF_PAYLOAD_CRC_OK);
(void)QUEUE((Packet_p->Communication_p), FifoEnqueue_Fn)(OBJECT_QUEUE(Packet_p->Communication_p), Packet_p->Communication_p->Inbound_p, Packet_p);
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
index 3576b4a..d1243f6 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
@@ -13,6 +13,6 @@
* LCD_LCM_CompatibilityList in file LcdVersion.cpp in LCD code.
*/
-char LCM_CurrentVersion[] = "P1Y";
+char LCM_CurrentVersion[] = "P2Y";
/** @} */
diff --git a/source/LCDriver.rc b/source/LCDriver.rc
index 3c8931d..83d56ba 100644
--- a/source/LCDriver.rc
+++ b/source/LCDriver.rc
@@ -81,15 +81,15 @@ BEGIN
BEGIN
BLOCK "000904b0"
BEGIN
- VALUE "Comments", "Build date: 2012-01-23"
+ VALUE "Comments", "Build date: 2012-01-25"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCDriver Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Loader Communication Driver"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: I2737059dcca62d769ca1876a4859f7c468fcfdd9"
+ VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "P1Y"
+ VALUE "ProductVersion", "P2Y"
END
END
BLOCK "VarFileInfo"
diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp
index 9ce1986..58e0783 100644
--- a/source/LCDriverMethods.cpp
+++ b/source/LCDriverMethods.cpp
@@ -1946,7 +1946,7 @@ int CLCDriverMethods::Do_A2_System_LoaderOnLoader(const char *pchPath, int iPLOf
NumberOfPackets = PL / PacketSize;
- if (NumberOfPackets * PacketSize == PL) {
+ if (NumberOfPackets *PacketSize == PL) {
NumberOfPackets--;
}
@@ -2346,7 +2346,7 @@ int CLCDriverMethods::Do_PROTROM_DownloadLoader(const char *pchPath, int iPLOffs
//Download all packet beside one
NumberOfPackets = PL / PacketSize;
- if (NumberOfPackets * PacketSize == PL) {
+ if (NumberOfPackets *PacketSize == PL) {
NumberOfPackets--;
}
diff --git a/source/LCM/Hash.cpp b/source/LCM/Hash.cpp
index 7836604..94fb585 100644
--- a/source/LCM/Hash.cpp
+++ b/source/LCM/Hash.cpp
@@ -23,21 +23,21 @@
**********************************************************************/
const uint32 red[16] = {
0,
- (0x1 << 16) ^ (0x1021 << 0), \
- (0x2 << 16) ^ (0x1021 << 1), \
- (0x3 << 16) ^ (0x1021 << 1) ^ (0x1021 << 0), \
- (0x4 << 16) ^ (0x1021 << 2), \
- (0x5 << 16) ^ (0x1021 << 2) ^ (0x1021 << 0), \
- (0x6 << 16) ^ (0x1021 << 2) ^ (0x1021 << 1), \
- (0x7 << 16) ^ (0x1021 << 2) ^ (0x1021 << 1) ^ (0x1021 << 0), \
- (0x8 << 16) ^ (0x1021 << 3), \
- (0x9 << 16) ^ (0x1021 << 3) ^ (0x1021 << 0), \
- (0xa << 16) ^ (0x1021 << 3) ^ (0x1021 << 1), \
- (0xb << 16) ^ (0x1021 << 3) ^ (0x1021 << 1) ^ (0x1021 << 0), \
- (0xc << 16) ^ (0x1021 << 3) ^ (0x1021 << 2), \
- (0xd << 16) ^ (0x1021 << 3) ^ (0x1021 << 2) ^ (0x1021 << 0), \
- (0xe << 16) ^ (0x1021 << 3) ^ (0x1021 << 2) ^ (0x1021 << 1), \
- (0xf << 16) ^ (0x1021 << 3) ^ (0x1021 << 2) ^ (0x1021 << 1) ^ (0x1021 << 0)
+ (0x1 << 16) ^(0x1021 << 0), \
+ (0x2 << 16) ^(0x1021 << 1), \
+ (0x3 << 16) ^(0x1021 << 1) ^(0x1021 << 0), \
+ (0x4 << 16) ^(0x1021 << 2), \
+ (0x5 << 16) ^(0x1021 << 2) ^(0x1021 << 0), \
+ (0x6 << 16) ^(0x1021 << 2) ^(0x1021 << 1), \
+ (0x7 << 16) ^(0x1021 << 2) ^(0x1021 << 1) ^(0x1021 << 0), \
+ (0x8 << 16) ^(0x1021 << 3), \
+ (0x9 << 16) ^(0x1021 << 3) ^(0x1021 << 0), \
+ (0xa << 16) ^(0x1021 << 3) ^(0x1021 << 1), \
+ (0xb << 16) ^(0x1021 << 3) ^(0x1021 << 1) ^(0x1021 << 0), \
+ (0xc << 16) ^(0x1021 << 3) ^(0x1021 << 2), \
+ (0xd << 16) ^(0x1021 << 3) ^(0x1021 << 2) ^(0x1021 << 0), \
+ (0xe << 16) ^(0x1021 << 3) ^(0x1021 << 2) ^(0x1021 << 1), \
+ (0xf << 16) ^(0x1021 << 3) ^(0x1021 << 2) ^(0x1021 << 1) ^(0x1021 << 0)
};
Hash::Hash()
@@ -188,7 +188,7 @@ uint16 Hash::crc16(const uint8 *p, int count, uint16 crc_in)
register uint32 crc = crc_in;
while (--count >= 0) {
- crc = crc ^ (uint8) * p++ << 8;
+ crc = crc ^(uint8) * p++ << 8;
crc ^= red[crc >> 16];
crc = (crc << 4);
crc ^= red[crc >> 16];
diff --git a/source/LcdVersion.cpp b/source/LcdVersion.cpp
index 5cd757e..daf7e56 100644
--- a/source/LcdVersion.cpp
+++ b/source/LcdVersion.cpp
@@ -18,6 +18,6 @@
* This table contains compatibility information for the versions of LCM.
* Current LCM version is defined in file lcm_version.c in LCM code.
*/
-char *LCD_LCM_CompatibilityList[] = {"P1Y",
- NULL
- };
+const char *LCD_LCM_CompatibilityList[] = {"P2Y",
+ NULL
+ };
diff --git a/source/LcmInterface.cpp b/source/LcmInterface.cpp
index b7067ed..516e111 100644
--- a/source/LcmInterface.cpp
+++ b/source/LcmInterface.cpp
@@ -16,7 +16,7 @@
#endif
char *LcmInterface::m_pchLCMLibPath = 0;
-extern char *LCD_LCM_CompatibilityList[];
+extern const char *LCD_LCM_CompatibilityList[];
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@@ -170,10 +170,12 @@ ErrorCode_e LcmInterface::CommunicationInitialize(void *Object_p, Family_t Famil
ReturnValue = Communication.Initialize_Fn(Object_p, &m_pCommunication, Family, HashDevice_p, CommunicationDevice_p, CommandCallback_p, Buffers_p, Timers_p, Queue_p);
ErrorExit:
- if (ReturnValue != E_SUCCESS){
+
+ if (ReturnValue != E_SUCCESS) {
CloseLCMLibrary();
m_hDLL = NULL;
}
+
return static_cast<ErrorCode_e>(ReturnValue);
}
@@ -212,6 +214,7 @@ ErrorCode_e LcmInterface::CommunicationCheckVersion(char *LCMVersion_p, LCM_t LC
ReturnValue = E_SUCCESS;
break;
}
+
i++;
} while (LCD_LCM_CompatibilityList[i] != NULL);
diff --git a/source/api_wrappers/linux/CThreadWrapper.cpp b/source/api_wrappers/linux/CThreadWrapper.cpp
index ab3f69b..4fe9362 100644
--- a/source/api_wrappers/linux/CThreadWrapper.cpp
+++ b/source/api_wrappers/linux/CThreadWrapper.cpp
@@ -30,7 +30,7 @@
// Desc: CEventObject constructor which initializes the class members
// Ret:
// ******************************************************************************
-CThreadWrapper::CThreadWrapper(void * (*pStartAddress)(void *), void *pArgument)
+CThreadWrapper::CThreadWrapper(void *(*pStartAddress)(void *), void *pArgument)
{
m_pStartAddress = pStartAddress;
m_pArgument = pArgument;
diff --git a/source/api_wrappers/linux/CThreadWrapper.h b/source/api_wrappers/linux/CThreadWrapper.h
index c7bfe01..e02a6e8 100644
--- a/source/api_wrappers/linux/CThreadWrapper.h
+++ b/source/api_wrappers/linux/CThreadWrapper.h
@@ -15,7 +15,7 @@ typedef void *(*StartAddress_t)(void *);
class CThreadWrapper : public CWaitableObject
{
public:
- CThreadWrapper(void * (* pStartAddress)(void *), void *pArgument);
+ CThreadWrapper(void *(* pStartAddress)(void *), void *pArgument);
~CThreadWrapper();
void ResumeThread();
void SuspendThread();
diff --git a/source/config/a2_commands_marshal_cpp.xsl b/source/config/a2_commands_marshal_cpp.xsl
index a30be7b..5a9b822 100644
--- a/source/config/a2_commands_marshal_cpp.xsl
+++ b/source/config/a2_commands_marshal_cpp.xsl
@@ -206,6 +206,7 @@ ErrorCode_e <value-of select="concat('A2LoaderRpcInterface::DoneRPC_', ../interf
<apply-templates select="output/value" mode="serialize_size_declaration" />
<apply-templates select="output/value" mode="serialize_size"/>
A2_COMMANDDATA(A2_GENERAL_RESPONSE, <call-template name="groupidmain"/>, <call-template name="commandid"/>, Session, PLSize);
+ (void)(Data_p);
Data_p = CmdData.Payload.Data_p;
<apply-templates select="output/value" mode="serialize"/>
diff --git a/source/config/commands_marshal_cpp.xsl b/source/config/commands_marshal_cpp.xsl
index 14a1c3e..4addd39 100644
--- a/source/config/commands_marshal_cpp.xsl
+++ b/source/config/commands_marshal_cpp.xsl
@@ -160,6 +160,7 @@ ErrorCode_e <value-of select="concat('LoaderRpcInterface::DoRPC_', ../interface[
<apply-templates select="input/value" mode="serialize_size_declaration" />
<apply-templates select="input/value" mode="serialize_size"/>
COMMANDDATAOUT(COMMAND_TYPE, <call-template name="groupidmain"/>, <call-template name="commandid"/>, SessionOut, PLSize);
+ (void)(Data_p);
Data_p = CmdData.Payload.Data_p;
<apply-templates select="input/value" mode="serialize"/>
Answer = lcmInterface_->CommandSend(&amp;CmdData);
diff --git a/source/security_algorithms/sha/sha2.cpp b/source/security_algorithms/sha/sha2.cpp
index f3986ca..07473e7 100644
--- a/source/security_algorithms/sha/sha2.cpp
+++ b/source/security_algorithms/sha/sha2.cpp
@@ -468,8 +468,8 @@ void SHA256_Transform(SHA256_CTX *context, const sha2_word32 *data)
/* Apply the SHA-256 compression function to update a..h */
T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-256 compression function to update a..h with copy */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
+/* Apply the SHA-256 compression function to update a..h with copy */
+T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
#endif /* BYTE_ORDER == LITTLE_ENDIAN */
T2 = Sigma0_256(a) + Maj(a, b, c);
h = g;
@@ -810,8 +810,8 @@ void SHA512_Transform(SHA512_CTX *context, const sha2_word64 *data)
/* Apply the SHA-512 compression function to update a..h */
T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-512 compression function to update a..h with copy */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
+/* Apply the SHA-512 compression function to update a..h with copy */
+T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
#endif /* BYTE_ORDER == LITTLE_ENDIAN */
T2 = Sigma0_512(a) + Maj(a, b, c);
h = g;