mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-04-18 02:45:15 +02:00
Fix compiler warnings.
This commit is contained in:
parent
e767bb9fe9
commit
c9236a7337
6 changed files with 9 additions and 9 deletions
|
@ -717,7 +717,7 @@ bool Local_Storage::load_json(std::string full_path, nlohmann::json& json)
|
|||
|
||||
try {
|
||||
json = std::move(nlohmann::json::parse(buffer));
|
||||
PRINT_DEBUG("Loaded json \"%s\". Loaded %u items.\n", full_path.c_str(), json.size());
|
||||
PRINT_DEBUG("Loaded json \"%s\". Loaded %" PRI_ZU " items.\n", full_path.c_str(), json.size());
|
||||
return true;
|
||||
} catch (std::exception& e) {
|
||||
PRINT_DEBUG("Error while parsing \"%s\" json: %s\n", full_path.c_str(), e.what());
|
||||
|
|
|
@ -513,7 +513,7 @@ std::set<IP_PORT> Networking::resolve_ip(std::string dns)
|
|||
|
||||
if (getaddrinfo(dns.c_str(), NULL, NULL, &result) == 0) {
|
||||
for (struct addrinfo *res = result; res != NULL; res = res->ai_next) {
|
||||
PRINT_DEBUG("%u %u\n", res->ai_addrlen, res->ai_family);
|
||||
PRINT_DEBUG("%" PRI_ZU " %u\n", res->ai_addrlen, res->ai_family);
|
||||
if (res->ai_family == AF_INET) {
|
||||
struct sockaddr_in *ipv4 = (struct sockaddr_in *)res->ai_addr;
|
||||
uint32 ip;
|
||||
|
|
|
@ -110,7 +110,7 @@ static void load_gamecontroller_settings(Settings *settings)
|
|||
}
|
||||
|
||||
settings->controller_settings.action_sets[action_set_name] = button_pairs;
|
||||
PRINT_DEBUG("Added %u action names to %s\n", button_pairs.size(), action_set_name.c_str());
|
||||
PRINT_DEBUG("Added %" PRI_ZU " action names to %s\n", button_pairs.size(), action_set_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ Steam_Matchmaking_Servers::Steam_Matchmaking_Servers(class Settings *settings, c
|
|||
this->network->setCallback(CALLBACK_ID_GAMESERVER, (uint64) 0, &network_callback, this);
|
||||
}
|
||||
|
||||
static int server_list_request;
|
||||
static size_t server_list_request;
|
||||
|
||||
// Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.
|
||||
// Each call allocates a new asynchronous request object.
|
||||
|
@ -297,7 +297,7 @@ gameserveritem_t *Steam_Matchmaking_Servers::GetServerDetails( HServerListReques
|
|||
PRINT_DEBUG("equal? %p %p\n", hRequest, g->id);
|
||||
if (g->id == hRequest) {
|
||||
gameservers_filtered = g->gameservers_filtered;
|
||||
PRINT_DEBUG("found %u\n", gameservers_filtered.size());
|
||||
PRINT_DEBUG("found %" PRI_ZU "\n", gameservers_filtered.size());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -884,7 +884,7 @@ SteamNetworkingMessage_t *get_steam_message_connection(HSteamNetConnection hConn
|
|||
pMsg->m_pfnRelease = &delete_steam_message;
|
||||
pMsg->m_nChannel = 0;
|
||||
connect_socket->second.data.pop();
|
||||
PRINT_DEBUG("get_steam_message_connection %u %u, %u\n", hConn, size, pMsg->m_nMessageNumber);
|
||||
PRINT_DEBUG("get_steam_message_connection %u, %u, %" PRIu64 "\n", hConn, size, pMsg->m_nMessageNumber);
|
||||
return pMsg;
|
||||
}
|
||||
|
||||
|
@ -2089,13 +2089,13 @@ void Callback(Common_Message *msg)
|
|||
auto connect_socket = s->connect_sockets.find(msg->networking_sockets().connection_id());
|
||||
if (connect_socket != s->connect_sockets.end()) {
|
||||
if (connect_socket->second.remote_identity.GetSteamID64() == msg->source_id() && (connect_socket->second.status == CONNECT_SOCKET_CONNECTED)) {
|
||||
PRINT_DEBUG("Steam_Networking_Sockets: got data len %u, num %u on connection %u\n", msg->networking_sockets().data().size(), msg->networking_sockets().message_number(), connect_socket->first);
|
||||
PRINT_DEBUG("Steam_Networking_Sockets: got data len %" PRI_ZU ", num %" PRIu64 " on connection %u\n", msg->networking_sockets().data().size(), msg->networking_sockets().message_number(), connect_socket->first);
|
||||
connect_socket->second.data.push(msg->networking_sockets());
|
||||
}
|
||||
} else {
|
||||
connect_socket = std::find_if(s->connect_sockets.begin(), s->connect_sockets.end(), [msg](const auto &in) {return in.second.remote_identity.GetSteamID64() == msg->source_id() && (in.second.status == CONNECT_SOCKET_NOT_ACCEPTED || in.second.status == CONNECT_SOCKET_CONNECTED) && in.second.remote_id == msg->networking_sockets().connection_id_from();});
|
||||
if (connect_socket != s->connect_sockets.end()) {
|
||||
PRINT_DEBUG("Steam_Networking_Sockets: got data len %u, num %u on not accepted connection %u\n", msg->networking_sockets().data().size(), msg->networking_sockets().message_number(), connect_socket->first);
|
||||
PRINT_DEBUG("Steam_Networking_Sockets: got data len %" PRI_ZU ", num %" PRIu64 " on not accepted connection %u\n", msg->networking_sockets().data().size(), msg->networking_sockets().message_number(), connect_socket->first);
|
||||
connect_socket->second.data.push(msg->networking_sockets());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ bool SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworking
|
|||
bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
|
||||
ESteamNetworkingConfigDataType eDataType, const void *pArg )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Utils::SetConfigValue %i %i %p %i %p\n", eValue, eScopeType, scopeObj, eDataType, pArg);
|
||||
PRINT_DEBUG("Steam_Networking_Utils::SetConfigValue %i %i %" PRIuPTR " %i %p\n", eValue, eScopeType, scopeObj, eDataType, pArg);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue