mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-03 20:24:14 +02:00
Merge pull request #14756 from JoshuaVandaele/gcc16-warns-fix
Resolve various warnings
This commit is contained in:
@@ -111,7 +111,7 @@ static std::optional<std::size_t> find_split(std::string_view s, bool special,
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
ParseQualifiersResult parse_qualifiers(std::string_view str)
|
||||
static ParseQualifiersResult parse_qualifiers(std::string_view str)
|
||||
{
|
||||
std::string pre;
|
||||
std::string post;
|
||||
@@ -171,7 +171,7 @@ ParseQualifiersResult parse_qualifiers(std::string_view str)
|
||||
return {pre, post, str};
|
||||
}
|
||||
|
||||
std::optional<ParseDigitsResult> parse_digits(std::string_view str)
|
||||
static std::optional<ParseDigitsResult> parse_digits(std::string_view str)
|
||||
{
|
||||
if (str.empty())
|
||||
return std::nullopt;
|
||||
|
||||
@@ -162,8 +162,8 @@ private:
|
||||
u8 m_bits_per_sample = 9;
|
||||
};
|
||||
|
||||
CGBPlayer_mGBA::CGBPlayer_mGBA(Core::System& system, CHSPDevice_GBPlayer* player)
|
||||
: IGBPlayer(system, player), m_gba_core{m_system, Config::GBPLAYER_GBA_INDEX}
|
||||
CGBPlayer_mGBA::CGBPlayer_mGBA(Core::System& system, CHSPDevice_GBPlayer* gbplayer)
|
||||
: IGBPlayer(system, gbplayer), m_gba_core{m_system, Config::GBPLAYER_GBA_INDEX}
|
||||
{
|
||||
auto& core_timing = m_system.GetCoreTiming();
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ void FileSystem::DoStateRead(PointerWrap& p, const std::string& directory_path)
|
||||
return;
|
||||
}
|
||||
|
||||
Metadata metadata;
|
||||
Metadata metadata{};
|
||||
p.Do(metadata.uid);
|
||||
p.Do(metadata.gid);
|
||||
p.Do(metadata.attribute);
|
||||
|
||||
@@ -17,23 +17,19 @@ typedef pollfd pollfd_t;
|
||||
#elif defined(__linux__) or defined(__APPLE__) or defined(__FreeBSD__) or defined(__NetBSD__) or \
|
||||
defined(__OpenBSD__) or defined(__HAIKU__)
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#if defined(ANDROID) || defined(__HAIKU__)
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#include <sys/fcntl.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
|
||||
typedef struct pollfd pollfd_t;
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
@@ -895,8 +895,8 @@ DirectoryBlobPartition::DirectoryBlobPartition(
|
||||
const std::function<void(std::vector<FSTBuilderNode>* fst_nodes, FSTBuilderNode* dol_node)>&
|
||||
fst_callback,
|
||||
DirectoryBlobReader* blob)
|
||||
: m_wrapped_partition(partition),
|
||||
m_is_triforce(volume && volume->GetVolumeType() == Platform::Triforce)
|
||||
: m_is_triforce(volume && volume->GetVolumeType() == Platform::Triforce),
|
||||
m_wrapped_partition(partition)
|
||||
{
|
||||
std::vector<FSTBuilderNode> sys_nodes;
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ void ARCodeWidget::OnCodeToggleAllClicked()
|
||||
// file once per code.
|
||||
QSignalBlocker blocker(m_code_list);
|
||||
|
||||
for (int i = 0; i < m_ar_codes.size(); ++i)
|
||||
for (int i = 0; i < static_cast<int>(m_ar_codes.size()); ++i)
|
||||
{
|
||||
m_ar_codes[i].enabled = new_state;
|
||||
m_code_list->item(i)->setCheckState(new_check_state);
|
||||
|
||||
@@ -471,7 +471,7 @@ void GeckoCodeWidget::ToggleAllCodes()
|
||||
// file once per code.
|
||||
QSignalBlocker blocker(m_code_list);
|
||||
|
||||
for (int i = 0; i < m_gecko_codes.size(); ++i)
|
||||
for (int i = 0; i < static_cast<int>(m_gecko_codes.size()); ++i)
|
||||
{
|
||||
m_gecko_codes[i].enabled = new_state;
|
||||
m_code_list->item(i)->setCheckState(new_check_state);
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include "Common/CWDemangler.h"
|
||||
|
||||
using namespace CWDemangler;
|
||||
|
||||
void DoDemangleTemplateArgsTest(std::string mangled, std::string name, std::string template_args)
|
||||
static void DoDemangleTemplateArgsTest(std::string mangled, std::string name,
|
||||
std::string template_args)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -28,7 +28,7 @@ void DoDemangleTemplateArgsTest(std::string mangled, std::string name, std::stri
|
||||
}
|
||||
}
|
||||
|
||||
void DoDemangleNameTest(std::string mangled, std::string name, std::string full_name)
|
||||
static void DoDemangleNameTest(std::string mangled, std::string name, std::string full_name)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -44,7 +44,8 @@ void DoDemangleNameTest(std::string mangled, std::string name, std::string full_
|
||||
}
|
||||
}
|
||||
|
||||
void DoDemangleQualifiedNameTest(std::string mangled, std::string base_name, std::string full_name)
|
||||
static void DoDemangleQualifiedNameTest(std::string mangled, std::string base_name,
|
||||
std::string full_name)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -60,8 +61,8 @@ void DoDemangleQualifiedNameTest(std::string mangled, std::string base_name, std
|
||||
}
|
||||
}
|
||||
|
||||
void DoDemangleArgTest(std::string mangled, std::string type_pre, std::string type_post,
|
||||
std::string remainder)
|
||||
static void DoDemangleArgTest(std::string mangled, std::string type_pre, std::string type_post,
|
||||
std::string remainder)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -77,7 +78,7 @@ void DoDemangleArgTest(std::string mangled, std::string type_pre, std::string ty
|
||||
}
|
||||
}
|
||||
|
||||
void DoDemangleFunctionArgsTest(std::string mangled, std::string args, std::string remainder)
|
||||
static void DoDemangleFunctionArgsTest(std::string mangled, std::string args, std::string remainder)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -92,7 +93,7 @@ void DoDemangleFunctionArgsTest(std::string mangled, std::string args, std::stri
|
||||
}
|
||||
}
|
||||
|
||||
void DoDemangleTest(std::string mangled, std::string demangled)
|
||||
static void DoDemangleTest(std::string mangled, std::string demangled)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions();
|
||||
|
||||
@@ -104,8 +105,8 @@ void DoDemangleTest(std::string mangled, std::string demangled)
|
||||
EXPECT_EQ(result, expected);
|
||||
}
|
||||
|
||||
void DoDemangleOptionsTest(bool omit_empty_params, bool mw_extensions, std::string mangled,
|
||||
std::string demangled)
|
||||
static void DoDemangleOptionsTest(bool omit_empty_params, bool mw_extensions, std::string mangled,
|
||||
std::string demangled)
|
||||
{
|
||||
DemangleOptions options = DemangleOptions(omit_empty_params, mw_extensions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user