fix windows build errors and warnings

This commit is contained in:
Brad Hefta-Gaub 2014-02-05 13:54:17 -08:00
parent 7d5366a1b8
commit a05e07460f
4 changed files with 5 additions and 4 deletions

View file

@ -481,7 +481,7 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
// copy the samples we'll resample from the ring buffer - this also
// pushes the read pointer of the ring buffer forwards
int16_t ringBufferSamples[numNetworkOutputSamples];
int16_t* ringBufferSamples= new int16_t[numNetworkOutputSamples];
_ringBuffer.readSamples(ringBufferSamples, numNetworkOutputSamples);
// add the next numNetworkOutputSamples from each QByteArray
@ -502,6 +502,7 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
Q_ARG(QByteArray, QByteArray((char*) ringBufferSamples, numNetworkOutputSamples)),
Q_ARG(bool, true), Q_ARG(bool, false));
}
delete[] ringBufferSamples;
}
}

View file

@ -138,7 +138,7 @@ void DatagramSequencer::receivedDatagram(const QByteArray& datagram) {
}
// read and dispatch the high-priority messages
quint32 highPriorityMessageCount;
int highPriorityMessageCount;
_incomingPacketStream >> highPriorityMessageCount;
int newHighPriorityMessages = highPriorityMessageCount - _receivedHighPriorityMessages;
for (int i = 0; i < highPriorityMessageCount; i++) {

View file

@ -337,7 +337,7 @@ void NodeList::processSTUNResponse(const QByteArray& packet) {
const uint32_t RFC_5389_MAGIC_COOKIE_NETWORK_ORDER = htonl(RFC_5389_MAGIC_COOKIE);
size_t attributeStartIndex = NUM_BYTES_STUN_HEADER;
int attributeStartIndex = NUM_BYTES_STUN_HEADER;
if (memcmp(packet.data() + NUM_BYTES_MESSAGE_TYPE_AND_LENGTH,
&RFC_5389_MAGIC_COOKIE_NETWORK_ORDER,

View file

@ -37,7 +37,7 @@ int packArithmeticallyCodedValue(int value, char* destination) {
return 1;
} else {
// pack 255 and then recursively pack on
destination[0] = 255;
((unsigned char*)destination)[0] = 255;
return 1 + packArithmeticallyCodedValue(value - 255, destination + 1);
}
}