chore: give up on InlinedVector due to spurious warnings with optional (#3765)

This commit is contained in:
Roman Gershman 2024-09-23 11:34:39 +03:00 committed by GitHub
parent 7df95dfb6e
commit 9c49aee43d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 10 deletions

View file

@ -593,13 +593,9 @@ OpResult<JsonCallbackResult<T>> JsonEvaluateOperation(const OpArgs& op_args, std
EvaluateOperationOptions options = {}) {
OpResult<JsonType*> result = GetJson(op_args, key);
if (options.return_nil_if_key_not_found && result == OpStatus::KEY_NOTFOUND) {
// GCC 13.1 throws spurious warnings around this code.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
return JsonCallbackResult<T>{
{JsonPathType::kLegacy, options.cb_result_options.saving_order,
CallbackResultOptions::OnEmpty::kSendNil}}; // set legacy mode to return nil
#pragma GCC diagnostic pop
}
RETURN_ON_BAD_STATUS(result);