Fix warnings in non-unity static-analysis builds - #20
Open
bozalina wants to merge 1 commit into
Open
Conversation
Headers: - Add `override` to defaulted destructors in ResponseMessage and 14 WebSocket request/response subclasses (-Wsuggest-override). - Cast size_t loop indices to int in LogParameters::operator== to match getLogPath's int parameter. Sources: - Combiner.cpp: fold `insertSuccess` local into `assert(pair.second)` directly; the local was unused under NDEBUG. - JsonHelper.cpp / HttpClient.cpp / AwsSigV4Utility.cpp: static_cast<int> on size_t values passed to APIs that take int (send, HMAC_Init_ex, getLogPath). - HttpClient.cpp: widen jsonStart/jsonEnd from int to size_t to match std::string::find return type. - WebSocketppClientWrapper.cpp: mark unused OnMessage/OnTlsInit parameters as (void), drop an unused local errorMessage. - GameLiftServerState.cpp: initialize m_onUpdateGameSession(nullptr) in both GAMELIFT_USE_STD and non-STD constructor init lists to silence uninitialized-member warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Headers:
overrideto defaulted destructors in ResponseMessage and 14 WebSocket request/response subclasses (-Wsuggest-override).Sources:
insertSuccesslocal intoassert(pair.second)directly; the local was unused under NDEBUG.on size_t values passed to APIs that take int (send, HMAC_Init_ex, getLogPath).
Description of Testing and Validations of Changes
Verified by building the vendored SDK sources as part of the GameLift Server SDK plugin inside an Unreal Engine 5 project (MSVC, non-unity, warnings-as-errors), which compiles cleanly with these changes.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.