Skip to content

Commit 49a16ff

Browse files
amabluea-maurice
authored andcommitted
Cleaned up some warnings that manifest on the open source build.
PiperOrigin-RevId: 311203902
1 parent c439d56 commit 49a16ff

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

database/src/desktop/connection/persistent_connection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void PersistentConnection::HandleConnectStatsResponse(
238238
if (status != kRequestStatusOk) {
239239
auto error = GetStringValue(message, kServerDataUpdateBody, true);
240240

241-
if (LogGetLevel() > kLogLevelInfo) {
241+
if (GetLogLevel() > kLogLevelInfo) {
242242
logger_->LogDebug("%s Failed to send stats: %s (message: %s)",
243243
log_id_.c_str(), status.c_str(), error.c_str());
244244
}

database/src/desktop/core/indexed_variant.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <algorithm>
1818
#include <cassert>
1919

20+
#include "app/src/assert.h"
2021
#include "app/src/include/firebase/variant.h"
2122
#include "database/src/common/query_spec.h"
2223
#include "database/src/desktop/query_params_comparator.h"
@@ -113,6 +114,8 @@ const Variant* IndexedVariant::GetOrderByVariant(const Variant& key,
113114
return GetVariantValue(&value);
114115
}
115116
}
117+
FIREBASE_DEV_ASSERT_MESSAGE(false, "Invalid QueryParams::OrderBy");
118+
return nullptr;
116119
}
117120

118121
static bool IsDefinedOn(const Variant& variant, const QueryParams& params) {

database/src/desktop/core/operation.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ Optional<Operation> OperationForChild(const Operation& op,
157157
return OperationForChildListenComplete(op, child_key);
158158
}
159159
}
160+
FIREBASE_DEV_ASSERT_MESSAGE(false, "Invalid Operation::Type");
161+
return Optional<Operation>();
160162
}
161163

162164
} // namespace internal

database/src/desktop/query_params_comparator.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <cassert>
1818
#include <cstdint>
1919

20+
#include "app/src/assert.h"
2021
#include "app/src/util.h"
2122
#include "database/src/desktop/util_desktop.h"
2223

@@ -91,6 +92,8 @@ int QueryParamsComparator::Compare(const Variant& key_a, const Variant& value_a,
9192
return result;
9293
}
9394
}
95+
FIREBASE_DEV_ASSERT_MESSAGE(false, "Invalid QueryParams::OrderBy");
96+
return 0;
9497
}
9598

9699
int QueryParamsComparator::ComparePriorities(const Variant& value_a,

database/src/desktop/util_desktop.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,8 @@ std::pair<Variant, Variant> MakePost(const QueryParams& params,
10171017
return std::make_pair(name, value);
10181018
}
10191019
}
1020+
FIREBASE_DEV_ASSERT_MESSAGE(false, "Invalid QueryParams::OrderBy");
1021+
return std::pair<Variant, Variant>();
10201022
}
10211023

10221024
bool HasStart(const QueryParams& params) {

0 commit comments

Comments
 (0)