summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoroltolm <oleg.tolmatcev@gmail.com>2026-02-04 22:22:16 +0100
committeroltolm <oleg.tolmatcev@gmail.com>2026-02-08 00:37:29 +0100
commit60351c19ccb5fb48cc82e7b6b59ae291577b5560 (patch)
tree66b67ab028f56ee99790211cec39b36bbc78ce10 /Source/Core
parenta8fbe8f28f622851333538ee0a2899bc159161ba (diff)
Misc: fix compiler warning: implicit declaration of function
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/CompatPatches.cpp2
-rw-r--r--Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp6
-rw-r--r--Source/Core/Core/HW/WiimoteReal/IOWin.cpp15
-rw-r--r--Source/Core/UpdaterCommon/UpdaterCommon.cpp44
-rw-r--r--Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp2
-rw-r--r--Source/Core/WinUpdater/Platform.cpp8
-rw-r--r--Source/Core/WinUpdater/WinUI.cpp4
7 files changed, 41 insertions, 40 deletions
diff --git a/Source/Core/Common/CompatPatches.cpp b/Source/Core/Common/CompatPatches.cpp
index 26c8815650..8697357883 100644
--- a/Source/Core/Common/CompatPatches.cpp
+++ b/Source/Core/Common/CompatPatches.cpp
@@ -124,7 +124,7 @@ private:
PIMAGE_DATA_DIRECTORY directories;
};
-void CompatPatchesInstall(LdrWatcher* watcher)
+static void CompatPatchesInstall(LdrWatcher* watcher)
{
watcher->Install({{L"EZFRD64.dll", L"811EZFRD64.DLL"}, [](const LdrDllLoadEvent& event) {
// *EZFRD64 is included in software packages for cheapo third-party gamepads
diff --git a/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp b/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp
index fc6051969d..c0abd75e43 100644
--- a/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp
+++ b/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp
@@ -12,7 +12,7 @@
namespace Win32TAPHelper
{
-bool IsTAPDevice(const TCHAR* guid)
+static bool IsTAPDevice(const TCHAR* guid)
{
HKEY netcard_key;
LONG status;
@@ -88,7 +88,7 @@ bool IsTAPDevice(const TCHAR* guid)
return false;
}
-bool GetGUIDs(std::vector<std::basic_string<TCHAR>>& guids)
+static bool GetGUIDs(std::vector<std::basic_string<TCHAR>>& guids)
{
LONG status;
HKEY control_net_key;
@@ -155,7 +155,7 @@ bool GetGUIDs(std::vector<std::basic_string<TCHAR>>& guids)
return !guids.empty();
}
-bool OpenTAP(HANDLE& adapter, const std::basic_string<TCHAR>& device_guid)
+static bool OpenTAP(HANDLE& adapter, const std::basic_string<TCHAR>& device_guid)
{
auto const device_path = USERMODEDEVICEDIR + device_guid + TAPSUFFIX;
diff --git a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp
index 7fbc5201bf..00bf2376a8 100644
--- a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp
+++ b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp
@@ -69,8 +69,9 @@ enum class AuthenticationMethod : bool
// BluetoothAuthenticateDeviceEx requires a bunch of rigmarole.. maybe some other day.
#pragma warning(push)
#pragma warning(disable : 4995)
-bool AuthenticateWiimote(HANDLE radio_handle, const BLUETOOTH_RADIO_INFO& radio_info,
- BLUETOOTH_DEVICE_INFO_STRUCT* btdi, AuthenticationMethod auth_method)
+static bool AuthenticateWiimote(HANDLE radio_handle, const BLUETOOTH_RADIO_INFO& radio_info,
+ BLUETOOTH_DEVICE_INFO_STRUCT* btdi,
+ AuthenticationMethod auth_method)
{
// When pressing the sync button, the remote expects the host's address as the pass key.
// When pressing 1+2 it expects its own address.
@@ -106,7 +107,7 @@ bool AuthenticateWiimote(HANDLE radio_handle, const BLUETOOTH_RADIO_INFO& radio_
}
#pragma warning(pop)
-std::optional<USBUtils::DeviceInfo> GetDeviceInfo(const WCHAR* hid_iface)
+static std::optional<USBUtils::DeviceInfo> GetDeviceInfo(const WCHAR* hid_iface)
{
// libusb opens without read/write access to get attributes, so we'll do that too.
constexpr auto open_access = 0;
@@ -296,15 +297,15 @@ u32 RemoveWiimoteBluetoothDevices(std::invocable<BLUETOOTH_DEVICE_INFO> auto&& s
// If they are *not* authenticated there's apparently no feasible way to reconnect them.
// We remove these problematic remembered devices so we can reconnect them.
// Otherwise, the user would need to manually deleting the device in control panel.
-u32 RemoveUnusableWiimoteBluetoothDevices()
+static u32 RemoveUnusableWiimoteBluetoothDevices()
{
return RemoveWiimoteBluetoothDevices([](const BLUETOOTH_DEVICE_INFO& btdi) {
return btdi.fRemembered && !btdi.fConnected && !btdi.fAuthenticated;
});
}
-u32 DiscoverAndPairWiimotes(u8 inquiry_length,
- std::optional<AuthenticationMethod> auth_method = std::nullopt)
+static u32 DiscoverAndPairWiimotes(u8 inquiry_length,
+ std::optional<AuthenticationMethod> auth_method = std::nullopt)
{
u32 success_count = 0;
EnumerateBluetoothWiimotes(
@@ -374,7 +375,7 @@ void WiimoteScannerWindows::Update()
}
// See http://wiibrew.org/wiki/Wiimote for the Report IDs and its sizes
-size_t GetReportSize(u8 rid)
+static size_t GetReportSize(u8 rid)
{
using namespace WiimoteCommon;
diff --git a/Source/Core/UpdaterCommon/UpdaterCommon.cpp b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
index 1f9271d4c7..56f9c7f7e8 100644
--- a/Source/Core/UpdaterCommon/UpdaterCommon.cpp
+++ b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
@@ -59,7 +59,7 @@ void LogToFile(const char* fmt, ...)
va_end(args);
}
-bool ProgressCallback(s64 total, s64 now, s64, s64)
+static bool ProgressCallback(s64 total, s64 now, s64, s64)
{
UI::SetCurrentProgress(static_cast<int>(now), static_cast<int>(total));
return true;
@@ -78,7 +78,7 @@ std::string HexEncode(const u8* buffer, size_t size)
return out;
}
-bool HexDecode(const std::string& hex, u8* buffer, size_t size)
+static bool HexDecode(const std::string& hex, u8* buffer, size_t size)
{
if (hex.size() != size * 2)
return false;
@@ -107,7 +107,7 @@ bool HexDecode(const std::string& hex, u8* buffer, size_t size)
return true;
}
-std::optional<std::string> GzipInflate(const std::string& data)
+static std::optional<std::string> GzipInflate(const std::string& data)
{
z_stream zstrm;
zstrm.zalloc = nullptr;
@@ -155,7 +155,7 @@ Manifest::Hash ComputeHash(const std::string& contents)
return out;
}
-bool VerifySignature(const std::string& data, const std::string& b64_signature)
+static bool VerifySignature(const std::string& data, const std::string& b64_signature)
{
u8 signature[64]; // ed25519 sig size.
size_t sig_size;
@@ -174,7 +174,7 @@ bool VerifySignature(const std::string& data, const std::string& b64_signature)
pub_key.data());
}
-void FlushLog()
+static void FlushLog()
{
log_file.Flush();
log_file.Close();
@@ -204,8 +204,8 @@ void TodoList::Log() const
}
}
-bool DownloadContent(const std::vector<TodoList::DownloadOp>& to_download,
- const std::string& content_base_url, const std::string& temp_path)
+static bool DownloadContent(const std::vector<TodoList::DownloadOp>& to_download,
+ const std::string& content_base_url, const std::string& temp_path)
{
Common::HttpRequest req(std::chrono::seconds(30), ProgressCallback);
@@ -266,14 +266,14 @@ bool DownloadContent(const std::vector<TodoList::DownloadOp>& to_download,
return true;
}
-bool PlatformVersionCheck(const std::vector<TodoList::UpdateOp>& to_update,
- const std::string& install_base_path, const std::string& temp_dir)
+static bool PlatformVersionCheck(const std::vector<TodoList::UpdateOp>& to_update,
+ const std::string& install_base_path, const std::string& temp_dir)
{
UI::SetDescription("Checking platform...");
return Platform::VersionCheck(to_update, install_base_path, temp_dir);
}
-TodoList ComputeActionsToDo(Manifest this_manifest, Manifest next_manifest)
+static TodoList ComputeActionsToDo(Manifest this_manifest, Manifest next_manifest)
{
TodoList todo;
@@ -317,7 +317,7 @@ TodoList ComputeActionsToDo(Manifest this_manifest, Manifest next_manifest)
return todo;
}
-void CleanUpTempDir(const std::string& temp_dir, const TodoList& todo)
+static void CleanUpTempDir(const std::string& temp_dir, const TodoList& todo)
{
// This is best-effort cleanup, we ignore most errors.
for (const auto& download : todo.to_download)
@@ -325,7 +325,7 @@ void CleanUpTempDir(const std::string& temp_dir, const TodoList& todo)
File::DeleteDir(temp_dir);
}
-bool BackupFile(const std::string& path)
+static bool BackupFile(const std::string& path)
{
std::string backup_path = path + ".bak";
LogToFile("Backing up existing %s to .bak.\n", path.c_str());
@@ -337,8 +337,8 @@ bool BackupFile(const std::string& path)
return true;
}
-bool DeleteObsoleteFiles(const std::vector<TodoList::DeleteOp>& to_delete,
- const std::string& install_base_path)
+static bool DeleteObsoleteFiles(const std::vector<TodoList::DeleteOp>& to_delete,
+ const std::string& install_base_path)
{
for (const auto& op : to_delete)
{
@@ -370,8 +370,8 @@ bool DeleteObsoleteFiles(const std::vector<TodoList::DeleteOp>& to_delete,
return true;
}
-bool UpdateFiles(const std::vector<TodoList::UpdateOp>& to_update,
- const std::string& install_base_path, const std::string& temp_path)
+static bool UpdateFiles(const std::vector<TodoList::UpdateOp>& to_update,
+ const std::string& install_base_path, const std::string& temp_path)
{
#ifdef _WIN32
const auto self_path = std::filesystem::path(Common::GetModuleName(nullptr).value());
@@ -479,8 +479,8 @@ bool UpdateFiles(const std::vector<TodoList::UpdateOp>& to_update,
return true;
}
-bool PerformUpdate(const TodoList& todo, const std::string& install_base_path,
- const std::string& content_base_url, const std::string& temp_path)
+static bool PerformUpdate(const TodoList& todo, const std::string& install_base_path,
+ const std::string& content_base_url, const std::string& temp_path)
{
LogToFile("Starting download step...\n");
if (!DownloadContent(todo.to_download, content_base_url, temp_path))
@@ -505,7 +505,7 @@ bool PerformUpdate(const TodoList& todo, const std::string& install_base_path,
return true;
}
-void FatalError(const std::string& message)
+static void FatalError(const std::string& message)
{
LogToFile("%s\n", message.c_str());
@@ -513,7 +513,7 @@ void FatalError(const std::string& message)
UI::Error(message);
}
-std::optional<Manifest> ParseManifest(const std::string& manifest)
+static std::optional<Manifest> ParseManifest(const std::string& manifest)
{
Manifest parsed;
size_t pos = 0;
@@ -556,7 +556,7 @@ std::optional<Manifest> ParseManifest(const std::string& manifest)
}
// Not showing a progress bar here because this part is just too quick
-std::optional<Manifest> FetchAndParseManifest(const std::string& url)
+static std::optional<Manifest> FetchAndParseManifest(const std::string& url)
{
Common::HttpRequest http;
@@ -614,7 +614,7 @@ struct Options
std::optional<std::string> log_file;
};
-std::optional<Options> ParseCommandLine(std::vector<std::string>& args)
+static std::optional<Options> ParseCommandLine(std::vector<std::string>& args)
{
using optparse::OptionParser;
diff --git a/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp b/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
index 0f81db9aaa..fbb5611528 100644
--- a/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DNativeVertexFormat.cpp
@@ -23,7 +23,7 @@ Gfx::CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl)
return std::make_unique<D3DVertexFormat>(vtx_decl);
}
-DXGI_FORMAT VarToD3D(ComponentFormat t, int size, bool integer)
+static DXGI_FORMAT VarToD3D(ComponentFormat t, int size, bool integer)
{
using FormatMap = Common::EnumMap<DXGI_FORMAT, ComponentFormat::InvalidFloat7>;
static constexpr auto f = [](FormatMap a) { return a; }; // Deduction helper
diff --git a/Source/Core/WinUpdater/Platform.cpp b/Source/Core/WinUpdater/Platform.cpp
index bca74cddb5..c48271be55 100644
--- a/Source/Core/WinUpdater/Platform.cpp
+++ b/Source/Core/WinUpdater/Platform.cpp
@@ -246,9 +246,9 @@ static VersionCheckResult OSVersionCheck(const BuildInfo& build_info)
return result;
}
-std::optional<BuildInfos> InitBuildInfos(const std::vector<TodoList::UpdateOp>& to_update,
- const std::string& install_base_path,
- const std::string& temp_dir)
+static std::optional<BuildInfos> InitBuildInfos(const std::vector<TodoList::UpdateOp>& to_update,
+ const std::string& install_base_path,
+ const std::string& temp_dir)
{
const auto op_it = std::ranges::find(to_update, "build_info.txt", &TodoList::UpdateOp::filename);
if (op_it == to_update.cend())
@@ -278,7 +278,7 @@ std::optional<BuildInfos> InitBuildInfos(const std::vector<TodoList::UpdateOp>&
return build_infos;
}
-bool CheckBuildInfo(const BuildInfos& build_infos)
+static bool CheckBuildInfo(const BuildInfos& build_infos)
{
// The existing BuildInfo may have been modified. Be careful not to overly trust its contents!
diff --git a/Source/Core/WinUpdater/WinUI.cpp b/Source/Core/WinUpdater/WinUI.cpp
index 6ff7461ce0..c6e65626e9 100644
--- a/Source/Core/WinUpdater/WinUI.cpp
+++ b/Source/Core/WinUpdater/WinUI.cpp
@@ -55,7 +55,7 @@ constexpr int PADDING_HEIGHT = 5;
namespace UI
{
-bool InitWindow()
+static bool InitWindow()
{
InitCommonControls();
@@ -206,7 +206,7 @@ void SetDescription(const std::string& text)
SetWindowText(label_handle, UTF8ToWString(text).c_str());
}
-void MessageLoop()
+static void MessageLoop()
{
HRESULT result = CoInitializeEx(nullptr, COINIT_MULTITHREADED);