diff --git a/CppRuleSet.ruleset b/CppRuleSet.ruleset
index ad63dc5a1a..540b9f7674 100644
--- a/CppRuleSet.ruleset
+++ b/CppRuleSet.ruleset
@@ -79,7 +79,7 @@
-
+
diff --git a/src/common/utils/elevation.h b/src/common/utils/elevation.h
index bad925c4e9..269f395d44 100644
--- a/src/common/utils/elevation.h
+++ b/src/common/utils/elevation.h
@@ -294,8 +294,9 @@ inline bool run_non_elevated(const std::wstring& file, const std::wstring& param
siex.StartupInfo.cb = sizeof(siex);
PROCESS_INFORMATION pi = { 0 };
+
auto succeeded = CreateProcessW(file.c_str(),
- const_cast(executable_args.c_str()),
+ &executable_args[0],
nullptr,
nullptr,
FALSE,
@@ -395,8 +396,9 @@ inline bool run_same_elevation(const std::wstring& file, const std::wstring& par
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi = { 0 };
+
auto succeeded = CreateProcessW(file.c_str(),
- const_cast(executable_args.c_str()),
+ &executable_args[0],
nullptr,
nullptr,
FALSE,
diff --git a/src/common/utils/exec.h b/src/common/utils/exec.h
index 3c6094e98d..0d4ca2cc6e 100644
--- a/src/common/utils/exec.h
+++ b/src/common/utils/exec.h
@@ -4,9 +4,10 @@
#include
// disable warning 26471 - Don't use reinterpret_cast. A cast from void* can use static_cast
+// disable warning 26492 - Don't use const_cast to cast away const
// Disable 26497 for winrt - This function function-name could be marked constexpr if compile-time evaluation is desired.
#pragma warning(push)
-#pragma warning(disable : 26471 26497)
+#pragma warning(disable : 26471 26492 26497)
#include
#pragma warning(pop)
diff --git a/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureDevice.cpp b/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureDevice.cpp
index 62d2b7933f..7b97891c5b 100644
--- a/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureDevice.cpp
+++ b/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureDevice.cpp
@@ -247,6 +247,10 @@ struct VideoCaptureReceiverPin : winrt::implements(pmt));
}
diff --git a/tools/WebcamReportTool/DirectShowUtils.h b/tools/WebcamReportTool/DirectShowUtils.h
index bb7b632fba..ccc94cf7c5 100644
--- a/tools/WebcamReportTool/DirectShowUtils.h
+++ b/tools/WebcamReportTool/DirectShowUtils.h
@@ -6,9 +6,10 @@
#include
// disable warning 26471 - Don't use reinterpret_cast. A cast from void* can use static_cast
+// disable warning 26492 - Don't use const_cast to cast away const on winrt
// Disable 26497 for winrt - This function function-name could be marked constexpr if compile-time evaluation is desired.
#pragma warning(push)
-#pragma warning(disable : 26471 26497)
+#pragma warning(disable : 26471 26492 26497)
#include
#pragma warning(push)
diff --git a/tools/WebcamReportTool/main.cpp b/tools/WebcamReportTool/main.cpp
index 233b046c8c..5f79b9b3fe 100644
--- a/tools/WebcamReportTool/main.cpp
+++ b/tools/WebcamReportTool/main.cpp
@@ -6,9 +6,10 @@
#include
// disable warning 26471 - Don't use reinterpret_cast. A cast from void* can use static_cast
+// disable warning 26492 - Don't use const_cast to cast away const
// Disable 26497 for winrt - This function function-name could be marked constexpr if compile-time evaluation is desired.
#pragma warning(push)
-#pragma warning(disable : 26471 26497)
+#pragma warning(disable : 26471 26492 26497)
#include
#pragma warning(push)