Skip to content

Commit e85a86a

Browse files
committed
Fix DockerHub warning messages for latest
Fixed DockerHub warning messages for the build 'latest'. These were due to Assert statements that used variables that were not used for anything else. I changed them to ifs with error log outputs.
1 parent 4817f8a commit e85a86a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/backend/parser/cypher_expr.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,17 @@ static Node *transform_AEXPR_IN(cypher_parsestate *cpstate, A_Expr *a)
565565

566566
scalar_type = AGTYPEOID;
567567

568-
Assert (verify_common_type(scalar_type, allexprs));
568+
/* verify they are a common type */
569+
if (!verify_common_type(scalar_type, allexprs))
570+
{
571+
ereport(ERROR,
572+
errmsg_internal("not a common type: %d", scalar_type));
573+
}
574+
569575
/*
570576
* coerce all the right-hand non-Var inputs to the common type
571577
* and build an ArrayExpr for them.
572578
*/
573-
574579
aexprs = NIL;
575580
foreach(l, rnonvars)
576581
{

src/backend/utils/adt/agtype_gin.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@ Datum gin_extract_agtype_query(PG_FUNCTION_ARGS)
242242

243243
/* it should be WAGT_BEGIN_ARRAY */
244244
itok = agtype_iterator_next(&it, &elem, true);
245-
Assert(itok == WAGT_BEGIN_ARRAY);
245+
if (itok != WAGT_BEGIN_ARRAY)
246+
{
247+
elog(ERROR, "unexpected iterator token: %d", itok);
248+
}
246249

247250
while (WAGT_END_ARRAY != agtype_iterator_next(&it, &elem, true))
248251
{

src/include/utils/agtype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/* Tokens used when sequentially processing an agtype value */
4747
typedef enum
4848
{
49-
WAGT_DONE,
49+
WAGT_DONE = 0x0,
5050
WAGT_KEY,
5151
WAGT_VALUE,
5252
WAGT_ELEM,

0 commit comments

Comments
 (0)