Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9902ebc

Browse filesBrowse files
author
Alexander Korotkov
committed
Some improvements to static analyzer checking.
1 parent 18ed1a2 commit 9902ebc
Copy full SHA for 9902ebc

File tree

4 files changed

+8
-3
lines changed
Filter options

4 files changed

+8
-3
lines changed

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ include $(top_builddir)/src/Makefile.global
2626
include $(top_srcdir)/contrib/contrib-global.mk
2727
endif
2828

29+
ifdef USE_ASSERT_CHECKING
30+
override CFLAGS += -DUSE_ASSERT_CHECKING
31+
endif
32+
2933
jsquery_gram.o: jsquery_scan.c
3034

3135
jsquery_gram.c: BISONFLAGS += -d

‎jsonb_gin_ops.c

Copy file name to clipboardExpand all lines: jsonb_gin_ops.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ make_value_path_entry_handler(ExtractedNode *node, Pointer extra)
462462
{
463463
Entries *e = (Entries *)extra;
464464
uint32 hash;
465-
bool lossy, partialMatch;
465+
bool lossy, partialMatch = false;
466466
GINKey *key;
467467
KeyExtra *keyExtra;
468468
int result;
@@ -1175,6 +1175,7 @@ gin_debug_query_path_value(PG_FUNCTION_ARGS)
11751175
Entries e = {0};
11761176
char *s;
11771177

1178+
11781179
jq = PG_GETARG_JSQUERY(0);
11791180
s = debugJsQuery(jq, make_path_value_entry_handler,
11801181
check_path_value_entry_handler, (Pointer)&e);

‎jsquery_op.c

Copy file name to clipboardExpand all lines: jsquery_op.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ checkScalarIn(JsQueryItem *jsq, JsonbValue *jb)
270270
static bool
271271
executeArrayOp(JsQueryItem *jsq, int32 op, JsonbValue *jb)
272272
{
273-
int32 r;
273+
int32 r = 0; /* keep static analyzer quiet */
274274
JsonbIterator *it;
275275
JsonbValue v;
276276
JsQueryItem elem;

‎travis/pg-travis-test.sh

Copy file name to clipboardExpand all lines: travis/pg-travis-test.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ $CHECK_CODE = "true" ]; then
3636
if [ "$CC" = "clang" ]; then
3737
sudo apt-get -y install -qq clang-$LLVM_VER
3838

39-
scan-build-$LLVM_VER --status-bugs make USE_PGXS=1 PG_CONFIG=$config_path || status=$?
39+
scan-build-$LLVM_VER --status-bugs make USE_PGXS=1 USE_ASSERT_CHECKING=1 PG_CONFIG=$config_path || status=$?
4040
exit $status
4141

4242
elif [ "$CC" = "gcc" ]; then

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.