Commit ebef6d56 authored by Marco Buttu's avatar Marco Buttu
Browse files

Fix #137: warnings in IRALibrary/MicroControllerBoard.cpp

parent 50af31f1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -192,9 +192,10 @@ std::vector<BYTE> MicroControllerBoard::receive(void) throw (MicroControllerBoar
                throw MicroControllerBoardEx("Mismatch between command id of request and answer.");

            // Check if the request parameters are the same as those at the beginning of the answer parameters
            if(!data.empty())
                if(data.size() < m_parameters.size())
            if(!data.empty()) {
                if(data.size() < m_parameters.size()) {
                    throw MicroControllerBoardEx("Mismatch between parameters size of answer and request.");
                }
                else {
                    for(std::vector<BYTE>::size_type idx=0; idx != m_parameters.size(); idx++)
                        if(data[idx] != m_parameters[idx])
@@ -207,6 +208,7 @@ std::vector<BYTE> MicroControllerBoard::receive(void) throw (MicroControllerBoar
                    for(std::vector<BYTE>::size_type idx=m_parameters.size(); idx != data.size(); idx++)
                        clean_data.push_back(data[idx]);
                }
            }
                        
            // Compute and verify the checksum
            std::vector<BYTE> base_checksum;