From b618ef257573b49d779ed8bf47ff1f46deca7154 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 27 Nov 2026 12:22:54 -0600 Subject: [PATCH] Fix C23 const correctness warnings --- src/Connection.c | 2 +- src/RtspConnection.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Connection.c b/src/Connection.c index c07b7b0..a72f780 100644 --- a/src/Connection.c +++ b/src/Connection.c @@ -191,7 +191,7 @@ static bool parseRtspPortNumberFromUrl(const char* rtspSessionUrl, uint16_t* por } // Pick the last colon in the string to match the port number - char* portNumberStart = strrchr(rtspSessionUrl, ':'); + const char* portNumberStart = strrchr(rtspSessionUrl, ':'); if (portNumberStart == NULL) { return false; } diff --git a/src/RtspConnection.c b/src/RtspConnection.c index 643ccc7..20c2e69 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -905,13 +905,13 @@ static bool parseUrlAddrFromRtspUrlString(const char* rtspUrlString, char* desti // a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) { // Find the entry for the specified attribute name - char* attribute = strstr(payload, name); + const char* attribute = strstr(payload, name); if (!attribute) { return false; } // Locate the start of the value - char* valst = strstr(attribute, ":"); + const char* valst = strstr(attribute, ":"); if (!valst) { return false; } @@ -924,13 +924,13 @@ bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* va bool parseSdpAttributeToInt(const char* payload, const char* name, int* val) { // Find the entry for the specified attribute name - char* attribute = strstr(payload, name); + const char* attribute = strstr(payload, name); if (!attribute) { return false; } // Locate the start of the value - char* valst = strstr(attribute, ":"); + const char* valst = strstr(attribute, ":"); if (!valst) { return false; }