Builds and runs on both windows and ubuntu

checksum-failure-logging
EricLiu2000 2019-06-25 13:15:20 -04:00
parent 92dc23fa4b
commit f45bd6772f
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif() endif()
else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-unknown-pragmas")
endif() endif()
# doxygen # doxygen

View File

@ -93,7 +93,7 @@ public:
Error = 0x30 Error = 0x30
}; };
APIEvent() : eventStruct({}), device(nullptr), serial(), timepoint() {} APIEvent() : eventStruct({}), serial(), timepoint(), device(nullptr) {}
APIEvent(APIEvent::Type event, APIEvent::Severity severity, const Device* device = nullptr); APIEvent(APIEvent::Type event, APIEvent::Severity severity, const Device* device = nullptr);
const neoevent_t* getNeoEvent() const noexcept { return &eventStruct; } const neoevent_t* getNeoEvent() const noexcept { return &eventStruct; }

View File

@ -39,7 +39,7 @@ public:
} }
void add(APIEvent::Type type, APIEvent::Severity severity, const Device* forDevice = nullptr) { void add(APIEvent::Type type, APIEvent::Severity severity, const Device* forDevice = nullptr) {
std::lock_guard<std::mutex> lk(mutex); std::lock_guard<std::mutex> lk(mutex);
add_internal(APIEvent::APIEvent(type, severity, forDevice)); add_internal(APIEvent(type, severity, forDevice));
} }
void discard(EventFilter filter = EventFilter()); void discard(EventFilter filter = EventFilter());

View File

@ -33,7 +33,7 @@ std::vector<PCAP::PCAPFoundDevice> PCAP::FindAll() {
} }
if(!success) { if(!success) {
EventManager::GetInstance().add(APIEvent::PCAPCouldNotFindDevices); EventManager::GetInstance().add(APIEvent::Type::PCAPCouldNotFindDevices, APIEvent::Severity::Error);
return std::vector<PCAPFoundDevice>(); return std::vector<PCAPFoundDevice>();
} }