Fixes to -Wall compilation

By default, not all warnings are enabled. This change makes sure that
the project compiles correctly with following options turned on:

    -Wall -Wno-unused-but-set-variable -Wno-missing-braces \
    -Wno-unknown-pragmas -Wno-unused-function
This commit is contained in:
Michał Janiszewski authored and Ted John committed 2016-06-20 13:46:27 +01:00
1 parent 9f2f7c6b68
commit 644a36a310
20 files changed
+30 -58

No files matched your search

+4 -2
View File
@@ -1428,7 +1428,9 @@ void Network::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket&
void Network::Client_Handle_AUTH(NetworkConnection& connection, NetworkPacket& packet)
{
packet >> (uint32&)connection.AuthStatus >> (uint8&)player_id;
uint32 auth_status;
packet >> auth_status >> (uint8&)player_id;
connection.AuthStatus = (NETWORK_AUTH)auth_status;
switch(connection.AuthStatus) {
case NETWORK_AUTH_OK:
Client_Send_GAMEINFO();
@@ -2347,7 +2349,7 @@ void network_send_password(const char* password)
const std::string pubkey = gNetwork.key.PublicKeyString();
size_t sigsize;
char *signature;
bool ok = gNetwork.key.Sign(gNetwork.challenge.data(), gNetwork.challenge.size(), &signature, &sigsize);
gNetwork.key.Sign(gNetwork.challenge.data(), gNetwork.challenge.size(), &signature, &sigsize);
// Don't keep private key in memory. There's no need and it may get leaked
// when process dump gets collected at some point in future.
gNetwork.key.Unload();