Skip to content

Commit 886cf23

Browse files
mikela-valvezpostfacto
authored andcommitted
Fix various compiler warnings
P4:10594986,10594987,10594988,10594991 (cherry picked from commit f3ebc72)
1 parent 4dcc9b1 commit 886cf23

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/steamnetworkingsockets/clientlib/csteamnetworkingmessages.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ EResult CSteamNetworkingMessages::SendMessageToUser( const SteamNetworkingIdenti
464464
}
465465

466466
// Try to create one
467-
SteamNetworkingConfigValue_t opt[1];
467+
SteamNetworkingConfigValue_t opt[ 1 ] = {};
468468
opt[0].SetInt32( k_ESteamNetworkingConfig_SymmetricConnect, 1 );
469469
ConnectionScopeLock connectionLock2;
470470
pConn = m_steamNetworkingSockets.InternalConnectP2PDefaultSignaling( identityRemote, k_nVirtualPort_Messages, 1, opt, connectionLock2 );

src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ bool CSteamNetworkingSockets::CreateSocketPair( HSteamNetConnection *pOutConnect
15551555
// Assume failure
15561556
*pOutConnection1 = k_HSteamNetConnection_Invalid;
15571557
*pOutConnection2 = k_HSteamNetConnection_Invalid;
1558-
SteamNetworkingIdentity identity[2];
1558+
SteamNetworkingIdentity identity[ 2 ] = {};
15591559
if ( pIdentity1 )
15601560
identity[0] = *pIdentity1;
15611561
else

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3428,7 +3428,7 @@ static void SteamNetworkingThreadProc()
34283428

34293429
#if defined(_WIN32) && !defined(__GNUC__)
34303430

3431-
#pragma warning( disable: 6132 ) // Possible infinite loop: use of the constant EXCEPTION_CONTINUE_EXECUTION in the exception-filter expression of a try-except. Execution restarts in the protected block.
3431+
#pragma warning( disable: 6312 ) // Possible infinite loop: use of the constant EXCEPTION_CONTINUE_EXECUTION in the exception-filter expression of a try-except. Execution restarts in the protected block.
34323432

34333433
typedef struct tagTHREADNAME_INFO
34343434
{

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_snp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ bool CSteamNetworkConnectionBase::ProcessPlainTextDataChunk( int usecTimeSinceLa
717717
#define READ_24BITU( var, pszWhatFor ) \
718718
do { EXPECT_BYTES(3,pszWhatFor); \
719719
var = *(uint8 *)pDecode; pDecode += 1; \
720-
var |= uint32( LittleWord(*(uint16 *)pDecode) ) << 8U; pDecode += 2; \
720+
var |= uint64( LittleWord(*(uint16 *)pDecode) ) << 8U; pDecode += 2; \
721721
} while(false)
722722

723723
#define READ_32BITU( var, pszWhatFor ) \

0 commit comments

Comments
 (0)