Fix final GCC sign warnings

This commit is contained in:
Cameron Gutman 2020-12-05 23:45:49 -06:00
parent 8dc304bcd3
commit 941ffef2ca
2 changed files with 15 additions and 15 deletions

View File

@ -92,7 +92,7 @@ static bool queuePacket(PRTP_FEC_QUEUE queue, PRTPFEC_QUEUE_ENTRY newEntry, bool
// Returns 0 if the frame is completely constructed // Returns 0 if the frame is completely constructed
static int reconstructFrame(PRTP_FEC_QUEUE queue) { static int reconstructFrame(PRTP_FEC_QUEUE queue) {
int totalPackets = U16(queue->bufferHighestSequenceNumber - queue->bufferLowestSequenceNumber) + 1; unsigned int totalPackets = U16(queue->bufferHighestSequenceNumber - queue->bufferLowestSequenceNumber) + 1;
int ret; int ret;
#ifdef FEC_VALIDATION_MODE #ifdef FEC_VALIDATION_MODE
@ -150,14 +150,14 @@ static int reconstructFrame(PRTP_FEC_QUEUE queue) {
#ifdef FEC_VALIDATION_MODE #ifdef FEC_VALIDATION_MODE
// Choose a packet to drop // Choose a packet to drop
int dropIndex = rand() % queue->bufferDataPackets; unsigned int dropIndex = rand() % queue->bufferDataPackets;
PRTP_PACKET droppedRtpPacket = NULL; PRTP_PACKET droppedRtpPacket = NULL;
int droppedRtpPacketLength = 0; int droppedRtpPacketLength = 0;
#endif #endif
PRTPFEC_QUEUE_ENTRY entry = queue->bufferHead; PRTPFEC_QUEUE_ENTRY entry = queue->bufferHead;
while (entry != NULL) { while (entry != NULL) {
int index = U16(entry->packet->sequenceNumber - queue->bufferLowestSequenceNumber); unsigned int index = U16(entry->packet->sequenceNumber - queue->bufferLowestSequenceNumber);
#ifdef FEC_VALIDATION_MODE #ifdef FEC_VALIDATION_MODE
if (index == dropIndex) { if (index == dropIndex) {
@ -181,7 +181,7 @@ static int reconstructFrame(PRTP_FEC_QUEUE queue) {
entry = entry->next; entry = entry->next;
} }
int i; unsigned int i;
for (i = 0; i < totalPackets; i++) { for (i = 0; i < totalPackets; i++) {
if (marks[i]) { if (marks[i]) {
packets[i] = malloc(packetBufferSize); packets[i] = malloc(packetBufferSize);

View File

@ -7,7 +7,7 @@ typedef struct _RTPFEC_QUEUE_ENTRY {
int length; int length;
bool isParity; bool isParity;
uint64_t receiveTimeMs; uint64_t receiveTimeMs;
unsigned int presentationTimeMs; uint32_t presentationTimeMs;
struct _RTPFEC_QUEUE_ENTRY* next; struct _RTPFEC_QUEUE_ENTRY* next;
struct _RTPFEC_QUEUE_ENTRY* prev; struct _RTPFEC_QUEUE_ENTRY* prev;
@ -17,17 +17,17 @@ typedef struct _RTP_FEC_QUEUE {
PRTPFEC_QUEUE_ENTRY bufferHead; PRTPFEC_QUEUE_ENTRY bufferHead;
PRTPFEC_QUEUE_ENTRY bufferTail; PRTPFEC_QUEUE_ENTRY bufferTail;
uint64_t bufferFirstRecvTimeMs; uint64_t bufferFirstRecvTimeMs;
int bufferSize; uint32_t bufferSize;
int bufferLowestSequenceNumber; uint32_t bufferLowestSequenceNumber;
int bufferHighestSequenceNumber; uint32_t bufferHighestSequenceNumber;
int bufferFirstParitySequenceNumber; uint32_t bufferFirstParitySequenceNumber;
int bufferDataPackets; uint32_t bufferDataPackets;
int bufferParityPackets; uint32_t bufferParityPackets;
int receivedBufferDataPackets; uint32_t receivedBufferDataPackets;
int fecPercentage; uint32_t fecPercentage;
int nextContiguousSequenceNumber; uint32_t nextContiguousSequenceNumber;
unsigned int currentFrameNumber; uint32_t currentFrameNumber;
} RTP_FEC_QUEUE, *PRTP_FEC_QUEUE; } RTP_FEC_QUEUE, *PRTP_FEC_QUEUE;
#define RTPF_RET_QUEUED 0 #define RTPF_RET_QUEUED 0