Fix gcc 13+ compilation and update fmt. (#142)

* Soc and artic_bass: gcc 13+ compatibility fix.

* externals/fmt: update to HEAD fcd3e1e19.
It will fix error.
  integer_sequence<bool, (Is == Is)...>  [-Werror=tautological-compare]
The updating is helpful and needed.
Fmt has gone through two public versions since its last update
and has fixed many bugs, including new compiler optimizations.
But neither of these two public versions can fix the errors encountered above.
We need to switch to a working version.
It can be fixed after fmt/8e62172.There are still many optimizations,
Such as this one:
  Std. h c++23 build fix (# 3856)
And these:
  C++23 compatibility: basicstring_view cannot be constructed from nullptr (# 3846)
  Fix warning C4702 emitted from format.h (MSVC) (#3866)
Of course, there are other functional improvements as well.
Very helpful.
The selected version is the one that has been checked and works well.

And synchronously updating local code.

* citra_qt/ui: clean up duplicate naming warnings.
This commit is contained in:
kongfl888 K 2024-06-14 19:23:07 +08:00 committed by GitHub
parent de1f082e75
commit 09dc3a5592
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 24 additions and 24 deletions

View file

@ -163,7 +163,7 @@ bool Client::Connect() {
}
main_socket = ::socket(AF_INET, SOCK_STREAM, 0);
if (main_socket == -1) {
if (main_socket == static_cast<SocketHolder>(-1)) {
LOG_ERROR(Network, "Failed to create socket");
SignalCommunicationError();
return false;
@ -249,7 +249,7 @@ bool Client::Connect() {
std::stringstream ss_port(worker_ports.value());
while (std::getline(ss_port, str_port, ',')) {
int port = str_to_int(str_port);
if (port < 0 || port > USHRT_MAX) {
if (port < 0 || port > static_cast<int>(USHRT_MAX)) {
shutdown(main_socket, SHUT_RDWR);
closesocket(main_socket);
LOG_ERROR(Network, "Couldn't parse server worker ports");
@ -518,7 +518,7 @@ std::optional<ArticBaseCommon::DataPacket> Client::SendRequestPacket(
const std::chrono::nanoseconds& read_timeout) {
std::scoped_lock<std::mutex> l(send_mutex);
if (main_socket == -1) {
if (main_socket == static_cast<SocketHolder>(-1)) {
return std::nullopt;
}
@ -586,7 +586,7 @@ Client::Handler::Handler(Client& _client, u32 _addr, u16 _port, int _id)
void Client::Handler::RunLoop() {
handler_socket = ::socket(AF_INET, SOCK_STREAM, 0);
if (handler_socket == -1) {
if (handler_socket == static_cast<SocketHolder>(-1)) {
LOG_ERROR(Network, "Failed to create socket");
return;
}