mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-24 05:31:13 +00:00
Fix GCC static analysis warnings
This commit is contained in:
+2
-2
@@ -1233,7 +1233,7 @@ static void requestIdrFrame(void) {
|
|||||||
|
|
||||||
// Send the reference frame invalidation request and read the response
|
// Send the reference frame invalidation request and read the response
|
||||||
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
|
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
|
||||||
payloadLengths[IDX_INVALIDATE_REF_FRAMES],
|
sizeof(payload),
|
||||||
payload,
|
payload,
|
||||||
CTRL_CHANNEL_URGENT,
|
CTRL_CHANNEL_URGENT,
|
||||||
ENET_PACKET_FLAG_RELIABLE,
|
ENET_PACKET_FLAG_RELIABLE,
|
||||||
@@ -1272,7 +1272,7 @@ static void requestInvalidateReferenceFrames(int startFrame, int endFrame) {
|
|||||||
|
|
||||||
// Send the reference frame invalidation request and read the response
|
// Send the reference frame invalidation request and read the response
|
||||||
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
|
if (!sendMessageAndDiscardReply(packetTypes[IDX_INVALIDATE_REF_FRAMES],
|
||||||
payloadLengths[IDX_INVALIDATE_REF_FRAMES],
|
sizeof(payload),
|
||||||
payload, CTRL_CHANNEL_URGENT,
|
payload, CTRL_CHANNEL_URGENT,
|
||||||
ENET_PACKET_FLAG_RELIABLE,
|
ENET_PACKET_FLAG_RELIABLE,
|
||||||
false)) {
|
false)) {
|
||||||
|
|||||||
+2
-2
@@ -459,7 +459,7 @@ static void stageCompleteFecBlock(PRTP_VIDEO_QUEUE queue) {
|
|||||||
|
|
||||||
unsigned int lowestRtpSequenceNumber = entry->packet->sequenceNumber;
|
unsigned int lowestRtpSequenceNumber = entry->packet->sequenceNumber;
|
||||||
|
|
||||||
while (entry != NULL) {
|
do {
|
||||||
// We should never encounter a packet that's lower than our next seq num
|
// We should never encounter a packet that's lower than our next seq num
|
||||||
LC_ASSERT(!isBefore16(entry->packet->sequenceNumber, nextSeqNum));
|
LC_ASSERT(!isBefore16(entry->packet->sequenceNumber, nextSeqNum));
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ static void stageCompleteFecBlock(PRTP_VIDEO_QUEUE queue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry = entry->next;
|
entry = entry->next;
|
||||||
}
|
} while (entry != NULL);
|
||||||
|
|
||||||
if (entry == NULL) {
|
if (entry == NULL) {
|
||||||
// Start at the lowest we found last enumeration
|
// Start at the lowest we found last enumeration
|
||||||
|
|||||||
+1
-1
@@ -104,11 +104,11 @@ int parseRtspMessage(PRTSP_MESSAGE msg, char* rtspMessage, int length) {
|
|||||||
|
|
||||||
// Get the status code
|
// Get the status code
|
||||||
token = strtok_r(NULL, delim, &strtokCtx);
|
token = strtok_r(NULL, delim, &strtokCtx);
|
||||||
statusCode = atoi(token);
|
|
||||||
if (token == NULL) {
|
if (token == NULL) {
|
||||||
exitCode = RTSP_ERROR_MALFORMED;
|
exitCode = RTSP_ERROR_MALFORMED;
|
||||||
goto ExitFailure;
|
goto ExitFailure;
|
||||||
}
|
}
|
||||||
|
statusCode = atoi(token);
|
||||||
|
|
||||||
// Get the status string
|
// Get the status string
|
||||||
statusStr = strtok_r(NULL, end, &strtokCtx);
|
statusStr = strtok_r(NULL, end, &strtokCtx);
|
||||||
|
|||||||
Reference in New Issue
Block a user