From 3d2fa083034ba843035f44e6257c629bcaadfd5a Mon Sep 17 00:00:00 2001 From: yomnes0 Date: Thu, 11 Jan 2024 18:42:02 +0100 Subject: [PATCH] [tests] Add const qualifier to string used for optlen testing --- test/test_socket_options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_socket_options.cpp b/test/test_socket_options.cpp index d5171973e..4307ee56e 100644 --- a/test/test_socket_options.cpp +++ b/test/test_socket_options.cpp @@ -853,7 +853,7 @@ TEST_F(TestSocketOptions, StreamIDWrongLen) //Check if setting -1 as optlen returns an error TEST_F(TestSocketOptions, StringOptLenInvalid) { - string test_string = "test123"; + const string test_string = "test123"; EXPECT_EQ(srt_setsockopt(m_caller_sock, 0, SRTO_STREAMID, test_string.c_str(), -1), SRT_ERROR); EXPECT_EQ(srt_getlasterror(NULL), SRT_EINVPARAM);