fixing all warnings and making sure they will stay fixed

Change-Id: Iff55ea18976562f37d6cc2848abff20c2c59ad96
This commit is contained in:
Patrick Plenefisch
2014-09-20 23:22:36 -04:00
parent 9e62e60e6f
commit 6710ac3a2f
3 changed files with 3 additions and 4 deletions

View File

@@ -4,6 +4,6 @@ set(ARM_PREFIX arm-frc-linux-gnueabi)
set(CMAKE_SYSTEM_NAME Linux)
CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
set(CMAKE_CXX_FLAGS "-std=c++1y -Wformat=2 -Wall -Wextra -Wno-psabi" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-std=c++1y -Wformat=2 -Wall -Wextra -Werror -Wno-psabi" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE) # still want debugging for release?

View File

@@ -90,7 +90,7 @@ private:
uint32_t periodMs;
txJob_t() : arbId(0),periodMs(0)
{
for(int i=0;i<sizeof(toSend);++i)
for(unsigned i=0;i<sizeof(toSend);++i)
toSend[i] = 0;
}
};

View File

@@ -1837,10 +1837,9 @@ void CANJaguar::ConfigNeutralMode(NeutralMode mode)
void CANJaguar::ConfigEncoderCodesPerRev(uint16_t codesPerRev)
{
uint8_t dataBuffer[8];
uint8_t dataSize;
// Set the codes per revolution mode
dataSize = packint16_t(dataBuffer, codesPerRev);
packint16_t(dataBuffer, codesPerRev);
sendMessage(LM_API_CFG_ENC_LINES, dataBuffer, sizeof(uint16_t));
m_encoderCodesPerRev = codesPerRev;