Skip to content

Commit cdc1915

Browse files
committed
(cleanup)
1 parent 30f95c8 commit cdc1915

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.vscode/c_cpp_properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"${workspaceFolder}/**",
77
"${workspaceFolder}/third_party/protobuf/src",
88
"/usr/include/postgresql",
9-
"/usr/include/postgresql/11/server"
9+
"/usr/include/postgresql/14/server"
1010
],
1111
"defines": [],
1212
"compilerPath": "/usr/bin/gcc",

build-and-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ POSTGRES_VERSION=${POSTGRES_VERSION:-11}
88
if [[ -n "${USE_DOCKER:-}" ]]; then
99
unset USE_DOCKER
1010
docker build --build-arg=POSTGRES_VERSION="${POSTGRES_VERSION}" -t postgres-protobuf-build:"${POSTGRES_VERSION}" .
11-
docker run postgres-protobuf-build:"${POSTGRES_VERSION}" env NO_CLEAN=1 __IN_DOCKER=1 /app/build-and-test.sh
11+
docker run postgres-protobuf-build:"${POSTGRES_VERSION}" env NO_CLEAN=1 POSTGRES_VERSION="${POSTGRES_VERSION}" __IN_DOCKER=1 /app/build-and-test.sh
1212
exit $?
1313
fi
1414

querying.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ class PrimitiveEmitter : public Emitter {
458458

459459
void ReadPrimitive(const FieldInfo& field) override {
460460
#ifndef PROTOBUF_LITTLE_ENDIAN
461-
static_assert(false, "big-endian not yet supported");
461+
#error "big-endian not yet supported"
462462
#endif
463463
PGPROTO_DEBUG("Emit primitive %d (wt %d, ty %d)", field.number,
464464
field.wire_type, ty_);
@@ -697,7 +697,8 @@ class FieldSelector : public ProtobufVisitor {
697697

698698
bool ShouldEmitCurrentIndex() const {
699699
return current_field_ == wanted_field_ &&
700-
(!wanted_index_.has_value() || current_index_ == wanted_index_.value());
700+
(!wanted_index_.has_value() ||
701+
current_index_ == wanted_index_.value());
701702
}
702703
};
703704

@@ -1298,7 +1299,7 @@ void QueryImpl::ParseNumericMapKey(const std::string& s,
12981299
pb::FieldDescriptor::Type ty,
12991300
FieldInfo::Value* v) {
13001301
#ifndef PROTOBUF_LITTLE_ENDIAN
1301-
static_assert(false, "big-endian not yet supported");
1302+
#error "big-endian not yet supported"
13021303
#endif
13031304
using T = pb::FieldDescriptor::Type;
13041305
using WFL = pb::internal::WireFormatLite;

0 commit comments

Comments
 (0)