From 1503946b7c0046ca751c4487d0bf65287395f567 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 11 Jun 2014 21:11:49 -0700 Subject: [PATCH 1/2] Fix build warning in Audio.cpp \interface\src\Audio.cpp(309): warning C4018: '<' : signed/unsigned mismatch --- interface/src/Audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index ebc228a13d..2cbe3a062f 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -306,7 +306,7 @@ void linearResampling(int16_t* sourceSamples, int16_t* destinationSamples, } else { // this is a 48 to 24 resampling but both source and destination are two channels // squish two samples into one in each channel - for (int i = 0; i < numSourceSamples; i += 4) { + for (unsigned int i = 0; i < numSourceSamples; i += 4) { destinationSamples[i / 2] = (sourceSamples[i] / 2) + (sourceSamples[i + 2] / 2); destinationSamples[(i / 2) + 1] = (sourceSamples[i + 1] / 2) + (sourceSamples[i + 3] / 2); } From d689c6b39fe31753cd4b5b5519d34cd566516e63 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 12 Jun 2014 13:15:54 -0700 Subject: [PATCH 2/2] fix reference to attribute in STUN packet --- libraries/networking/src/NodeList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 9a298ce26c..b872ec12cf 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -281,7 +281,7 @@ void NodeList::processSTUNResponse(const QByteArray& packet) { int byteIndex = attributeStartIndex + NUM_BYTES_STUN_ATTR_TYPE_AND_LENGTH + NUM_BYTES_FAMILY_ALIGN; uint8_t addressFamily = 0; - memcpy(&addressFamily, packet.data(), sizeof(addressFamily)); + memcpy(&addressFamily, packet.data() + byteIndex, sizeof(addressFamily)); byteIndex += sizeof(addressFamily);