Skip to content

Commit

Permalink
Fix GCC static analysis warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Sep 16, 2023
1 parent c13f4a3 commit 515bea6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ControlStream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ static void requestIdrFrame(void) {

// Send the reference frame invalidation request and read the response
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
payloadLengths[IDX_INVALIDATE_REF_FRAMES],
sizeof(payload),
payload,
CTRL_CHANNEL_URGENT,
ENET_PACKET_FLAG_RELIABLE,
Expand Down Expand Up @@ -1272,7 +1272,7 @@ static void requestInvalidateReferenceFrames(int startFrame, int endFrame) {

// Send the reference frame invalidation request and read the response
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
payloadLengths[IDX_INVALIDATE_REF_FRAMES],
sizeof(payload),
payload, CTRL_CHANNEL_URGENT,
ENET_PACKET_FLAG_RELIABLE,
false)) {
Expand Down
4 changes: 2 additions & 2 deletions src/RtpVideoQueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static void stageCompleteFecBlock(PRTP_VIDEO_QUEUE queue) {

unsigned int lowestRtpSequenceNumber = entry->packet->sequenceNumber;

while (entry != NULL) {
do {
// We should never encounter a packet that's lower than our next seq num
LC_ASSERT(!isBefore16(entry->packet->sequenceNumber, nextSeqNum));

Expand Down Expand Up @@ -499,7 +499,7 @@ static void stageCompleteFecBlock(PRTP_VIDEO_QUEUE queue) {
}

entry = entry->next;
}
} while (entry != NULL);

if (entry == NULL) {
// Start at the lowest we found last enumeration
Expand Down
2 changes: 1 addition & 1 deletion src/RtspParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ int parseRtspMessage(PRTSP_MESSAGE msg, char* rtspMessage, int length) {

// Get the status code
token = strtok_r(NULL, delim, &strtokCtx);
statusCode = atoi(token);
if (token == NULL) {
exitCode = RTSP_ERROR_MALFORMED;
goto ExitFailure;
}
statusCode = atoi(token);

// Get the status string
statusStr = strtok_r(NULL, end, &strtokCtx);
Expand Down

0 comments on commit 515bea6

Please sign in to comment.