diff --git a/source/lib/sysdep/os/win/tests/test_wdbg_sym.h b/source/lib/sysdep/os/win/tests/test_wdbg_sym.h index 733abe5afe..79477dbb44 100644 --- a/source/lib/sysdep/os/win/tests/test_wdbg_sym.h +++ b/source/lib/sysdep/os/win/tests/test_wdbg_sym.h @@ -236,7 +236,7 @@ class TestWdbgSym : public CxxTest::TestSuite // also exercises all basic types because we need to display some values // anyway (to see at a glance whether symbol engine addrs are correct) static void m_test_addrs([[maybe_unused]] int p_int, [[maybe_unused]] double p_double, - [[maybe_unused]] char* p_pchar, [[maybe_unused]] uintptr_t p_uintptr) + [[maybe_unused]] const char* p_pchar, [[maybe_unused]] uintptr_t p_uintptr) { [[maybe_unused]] size_t l_uint = 0x1234; [[maybe_unused]] bool l_bool = true; @@ -247,7 +247,7 @@ class TestWdbgSym : public CxxTest::TestSuite static double s_double = -2.718; static char s_chars[] = {'c','h','a','r','s',0}; - static void (*s_funcptr)(int, double, char*, uintptr_t) = m_test_addrs; + static void (*s_funcptr)(int, double, const char*, uintptr_t) = m_test_addrs; static void* s_ptr = (void*)(uintptr_t)0x87654321; static HDC s_hdc = (HDC)0xff0; diff --git a/source/lib/sysdep/os/win/wposix/wdlfcn.cpp b/source/lib/sysdep/os/win/wposix/wdlfcn.cpp index 6f9fc9ef6d..a04a3b0817 100644 --- a/source/lib/sysdep/os/win/wposix/wdlfcn.cpp +++ b/source/lib/sysdep/os/win/wposix/wdlfcn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -52,11 +52,11 @@ char* dlerror() switch(GetLastError()) { case ERROR_MOD_NOT_FOUND: - return "module not found"; + return const_cast("module not found"); case ERROR_PROC_NOT_FOUND: - return "symbol not found"; + return const_cast("symbol not found"); default: - return "unknown"; + return const_cast("unknown"); } }