diff --git a/platform/windows/pcap.cpp b/platform/windows/pcap.cpp index b31f6af..20a36a1 100644 --- a/platform/windows/pcap.cpp +++ b/platform/windows/pcap.cpp @@ -149,9 +149,12 @@ std::vector PCAP::FindByProduct(int product) { std::string serialFromMAC = GetEthDevSerialFromMacAddress(packet.srcMAC[3], ((packet.srcMAC[4] << 8) | packet.srcMAC[5])); neodevice_t neodevice; + #pragma warning(push) + #pragma warning(disable:4996) strncpy(neodevice.serial, serialFromMAC.c_str(), sizeof(neodevice.serial)); neodevice.serial[sizeof(neodevice.serial) - 1] = 0; - neodevice.handle = (i << 24) | (packet.srcMAC[3] << 16) | (packet.srcMAC[4] << 8) | (packet.srcMAC[5]); + #pragma warning(pop) + neodevice.handle = (neodevice_handle_t)((i << 24) | (packet.srcMAC[3] << 16) | (packet.srcMAC[4] << 8) | (packet.srcMAC[5])); bool alreadyExists = false; for(auto& dev : foundDevices) if(dev.handle == neodevice.handle) @@ -262,8 +265,6 @@ bool PCAP::close() { } void PCAP::readTask() { - constexpr size_t READ_BUFFER_SIZE = 10240; - uint8_t readbuf[READ_BUFFER_SIZE]; struct pcap_pkthdr* header; const uint8_t* data; while(!closing) { diff --git a/third-party/concurrentqueue/concurrentqueue.h b/third-party/concurrentqueue/concurrentqueue.h index aa046e5..d5bbd7d 100644 --- a/third-party/concurrentqueue/concurrentqueue.h +++ b/third-party/concurrentqueue/concurrentqueue.h @@ -30,6 +30,10 @@ #pragma once +#pragma warning(push) +#pragma warning(disable:4127) // ICS: Warnings generated by this file +#pragma warning(disable:4706) + #if defined(__GNUC__) // Disable -Wconversion warnings (spuriously triggered when Traits::size_t and // Traits::index_t are set to < 32 bits, causing integer promotion, causing warnings @@ -3633,3 +3637,5 @@ inline void swap(typename ConcurrentQueue::ImplicitProducerKVP& a, ty #if defined(__GNUC__) #pragma GCC diagnostic pop #endif + +#pragma warning(pop) \ No newline at end of file