File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ namespace MAT_NS_BEGIN {
186
186
void HttpClient_CAPI::CancelRequestAsync (const std::string& id)
187
187
{
188
188
LOG_TRACE (" Cancelling CAPI HTTP request '%s'" , id.c_str ());
189
- std::shared_ptr<HttpClient_Operation> operation;
189
+ std::shared_ptr<HttpClient_Operation> operation ( nullptr ) ;
190
190
{
191
191
// Only lock mutex while actually reading/writing pending operations collection to prevent potential recursive deadlock
192
192
LOCKGUARD (s_operationsLock);
@@ -199,7 +199,7 @@ namespace MAT_NS_BEGIN {
199
199
200
200
if (operation != nullptr )
201
201
{
202
- operation->Cancel ();
202
+ operation->Cancel ();// CodeQL [cpp/uninitializedptrfield] operation is explicitly constructed with nullptr so it will never hold garbage value
203
203
}
204
204
}
205
205
Original file line number Diff line number Diff line change @@ -6842,7 +6842,7 @@ class lexer : public lexer_base<BasicJsonType>
6842
6842
locale's decimal point is used instead of `.` to work with the
6843
6843
locale-dependent converters.
6844
6844
*/
6845
- token_type scan_number() // lgtm [cpp/use-of-goto]
6845
+ token_type scan_number() // CodeQL [cpp/use-of-goto] We explicitly allow the use of goto in this func
6846
6846
{
6847
6847
// reset token_buffer to store the number's bytes
6848
6848
reset();
You can’t perform that action at this time.
0 commit comments