From e5f1ba41b5d95ff818dcc4e5e7e7f21490febf4e Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Thu, 18 Oct 2018 13:49:56 -0400 Subject: [PATCH] Resolve relevant Linux compile warnings --- CMakeLists.txt | 2 +- api/icsneolegacy/icsneolegacy.cpp | 2 +- communication/include/decoder.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06df3b9..6a971a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-nested-anon-types -Wno-gnu-anonymous-struct -Wno-unknown-pragmas -Wno-zero-length-array -pedantic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-nested-anon-types -Wno-gnu-anonymous-struct -Wno-unknown-pragmas -Wno-zero-length-array") endif() # libftdi diff --git a/api/icsneolegacy/icsneolegacy.cpp b/api/icsneolegacy/icsneolegacy.cpp index fa83662..a7a8eed 100644 --- a/api/icsneolegacy/icsneolegacy.cpp +++ b/api/icsneolegacy/icsneolegacy.cpp @@ -57,7 +57,7 @@ int icsneoFindNeoDevices(unsigned long DeviceTypes, NeoDevice* pNeoDevice, int* count = bufferSize; *pNumDevices = (int)count; - for(int i = 0; i < count; i++) { + for(size_t i = 0; i < count; i++) { pNeoDevice[i] = OldNeoDeviceFromNew(&devices[i]); // Write out into user memory neodevices[uint64_t(devices[i].handle) << 32 | icsneo_serialStringToNum(devices[i].serial)] = devices[i]; // Fill the look up table } diff --git a/communication/include/decoder.h b/communication/include/decoder.h index d628999..7ea4e3d 100644 --- a/communication/include/decoder.h +++ b/communication/include/decoder.h @@ -87,7 +87,7 @@ private: uint16_t cpuMipsL; uint16_t busVoltage; uint16_t deviceTemperature; - } CoreMiniMsgResetStatus; + }; }; }