git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe8eaa5)
Suppress "variable may be used uninitialized" warning.
Fri, 5 Apr 2024 14:58:30 +0000 (10:58 -0400)
Fri, 5 Apr 2024 14:58:30 +0000 (10:58 -0400)
Buildfarm member caiman is showing this, which surprises me because
it's very late-model gcc (14.0.1) and ought to be smart enough to
know that elog(ERROR) doesn't return. But we're likely to see the
same from stupider compilers too, so add a dummy initialization in
our usual style.


diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 2f87255c47008270c01852a71c687032ca34f435..56a531de8db59471127ecbc7efce2b302466d45c 100644 (file)
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -4276,6 +4276,7 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func)
break;
default:
elog(ERROR, "invalid JsonFuncExpr op %d", (int) func->op);
+ default_format = JS_FORMAT_DEFAULT; /* keep compiler quiet */
break;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /