1.2 fails to build against PostgreSQL 19 beta 1. Can you please take a look? Thanks! Devrim
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -O2 -I. -I./ -I/usr/pgsql-19/include/server -I/usr/pgsql-19/include/internal -D_GNU_SOURCE -I/usr/include -I/usr/include/libxml2 -DWITH_GZFILEOP -flto=thin -emit-llvm -c -o jsquery_support.bc jsquery_support.c
In file included from /usr/pgsql-19/include/server/utils/elog.h:19,
from /usr/pgsql-19/include/server/postgres.h:49,
from jsquery_support.c:16:
jsquery_support.c: In function ‘alignStringInfoInt’:
/usr/pgsql-19/include/server/lib/stringinfo.h:233:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
232 | (((str)->len + 1 >= (str)->maxlen) ? \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233 | appendStringInfoChar(str, ch) : \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
234 | (void)((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_support.c:36:25: note: in expansion of macro ‘appendStringInfoCharMacro’
36 | appendStringInfoCharMacro(buf, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_support.c:38:17: note: here
38 | case 2:
| ^~~~
/usr/pgsql-19/include/server/lib/stringinfo.h:233:40: warning: this statement may fall through [-Wimplicit-fallthrough=]
232 | (((str)->len + 1 >= (str)->maxlen) ? \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233 | appendStringInfoChar(str, ch) : \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
234 | (void)((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_support.c:39:25: note: in expansion of macro ‘appendStringInfoCharMacro’
39 | appendStringInfoCharMacro(buf, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_support.c:41:17: note: here
41 | case 1:
| ^~~~
jsquery_support.c: In function ‘jsqInitByBuffer’:
jsquery_support.c:67:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
67 | case 3: pos++; /* fall through */
| ~~~^~
jsquery_support.c:68:17: note: here
68 | case 2: pos++; /* fall through */
| ^~~~
jsquery_support.c:68:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
68 | case 2: pos++; /* fall through */
| ~~~^~
jsquery_support.c:69:17: note: here
69 | case 1: pos++; /* fall through */
| ^~~~
jsquery_support.c:27:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
27 | (p) += sizeof(int32); \
| ~~~~^~~~~~~~~~~~~~~~
jsquery_support.c:92:25: note: in expansion of macro ‘read_int32’
92 | read_int32(v->value.datalen, base, pos);
| ^~~~~~~~~~
jsquery_support.c:95:17: note: here
95 | case jqiNumeric:
| ^~~~
jsquery_extract.c: In function ‘recursiveExtract’:
jsquery_extract.c:171:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
171 | else if (e.type != jqiArray)
| ^
jsquery_extract.c:184:17: note: here
184 | case jqiIn:
| ^~~~
jsonb_gin_ops.c: In function ‘make_gin_key’:
jsonb_gin_ops.c:50:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
50 | #define GINKeyDataNumeric(key) ((Pointer)key + INTALIGN(offsetof(GINKey, data)))
| ^
jsonb_gin_ops.c:291:32: note: in expansion of macro ‘GINKeyDataNumeric’
291 | memcpy(GINKeyDataNumeric(key), v->val.numeric, VARSIZE_ANY(v->val.numeric));
| ^~~~~~~~~~~~~~~~~
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:299:25: note: in expansion of macro ‘GINKeyDataString’
299 | GINKeyDataString(key) = hash_any((unsigned char *)v->val.string.val,
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c: In function ‘make_gin_key_string’:
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:319:9: note: in expansion of macro ‘GINKeyDataString’
319 | GINKeyDataString(key) = 0;
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c: In function ‘make_gin_query_value_key’:
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:344:25: note: in expansion of macro ‘GINKeyDataString’
344 | GINKeyDataString(key) = hash_any((unsigned char *)s, len);
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c:50:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
50 | #define GINKeyDataNumeric(key) ((Pointer)key + INTALIGN(offsetof(GINKey, data)))
| ^
jsonb_gin_ops.c:356:32: note: in expansion of macro ‘GINKeyDataNumeric’
356 | memcpy(GINKeyDataNumeric(key), numeric, VARSIZE_ANY(numeric));
| ^~~~~~~~~~~~~~~~~
In file included from /usr/pgsql-19/include/server/access/skey.h:19,
from /usr/pgsql-19/include/server/access/genam.h:19,
from /usr/pgsql-19/include/server/access/amapi.h:16,
from /usr/pgsql-19/include/server/access/hash.h:20,
from jsonb_gin_ops.c:18:
jsonb_gin_ops.c: In function ‘compare_gin_key_value’:
jsonb_gin_ops.c:50:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
50 | #define GINKeyDataNumeric(key) ((Pointer)key + INTALIGN(offsetof(GINKey, data)))
| ^
/usr/pgsql-19/include/server/fmgr.h:691:51: note: in definition of macro ‘DirectFunctionCall2’
691 | DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
| ^~~~
jsonb_gin_ops.c:529:58: note: in expansion of macro ‘PointerGetDatum’
529 | PointerGetDatum(GINKeyDataNumeric(arg1)),
| ^~~~~~~~~~~~~~~
jsonb_gin_ops.c:529:74: note: in expansion of macro ‘GINKeyDataNumeric’
529 | PointerGetDatum(GINKeyDataNumeric(arg1)),
| ^~~~~~~~~~~~~~~~~
jsonb_gin_ops.c:50:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
50 | #define GINKeyDataNumeric(key) ((Pointer)key + INTALIGN(offsetof(GINKey, data)))
| ^
/usr/pgsql-19/include/server/fmgr.h:691:57: note: in definition of macro ‘DirectFunctionCall2’
691 | DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
| ^~~~
jsonb_gin_ops.c:530:58: note: in expansion of macro ‘PointerGetDatum’
530 | PointerGetDatum(GINKeyDataNumeric(arg2))));
| ^~~~~~~~~~~~~~~
jsonb_gin_ops.c:530:74: note: in expansion of macro ‘GINKeyDataNumeric’
530 | PointerGetDatum(GINKeyDataNumeric(arg2))));
| ^~~~~~~~~~~~~~~~~
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:532:37: note: in expansion of macro ‘GINKeyDataString’
532 | if (GINKeyDataString(arg1) < GINKeyDataString(arg2))
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:532:62: note: in expansion of macro ‘GINKeyDataString’
532 | if (GINKeyDataString(arg1) < GINKeyDataString(arg2))
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:534:42: note: in expansion of macro ‘GINKeyDataString’
534 | else if (GINKeyDataString(arg1) == GINKeyDataString(arg2))
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c:49:57: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
49 | #define GINKeyDataString(key) (*(uint32 *)((Pointer)key + INTALIGN(offsetof(GINKey, data))))
| ^
jsonb_gin_ops.c:534:68: note: in expansion of macro ‘GINKeyDataString’
534 | else if (GINKeyDataString(arg1) == GINKeyDataString(arg2))
| ^~~~~~~~~~~~~~~~
jsonb_gin_ops.c: In function ‘gin_extract_jsonb_path_value_internal’:
jsonb_gin_ops.c:1154:36: warning: this statement may fall through [-Wimplicit-fallthrough=]
1154 | if (!stack->parent)
| ^
jsonb_gin_ops.c:1157:25: note: here
1157 | case WJB_END_OBJECT:
| ^~~~
jsquery_io.c: In function ‘flattenJsQueryParseItem’:
jsquery_io.c:46:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
46 | if (onlyCurrentInPath)
| ^
jsquery_io.c:49:17: note: here
49 | case jqiString:
| ^~~~
jsquery_io.c:120:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
120 | appendBinaryStringInfo(buf, (char*)&item->arrayIndex,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121 | sizeof(item->arrayIndex));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_io.c:123:17: note: here
123 | case jqiAny:
| ^~~~
jsquery_io.c: In function ‘printJsQueryItem’:
jsquery_io.c:242:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
242 | if (inKey)
| ^
jsquery_io.c:246:17: note: here
246 | case jqiString:
| ^~~~
jsquery_op.c:50:18: error: incompatible pointer types passing 'JsonbParseState **' (aka 'struct JsonbParseState **') to parameter of type 'JsonbInState *' (aka 'struct JsonbInState *')
[-Wincompatible-pointer-types]
50 | pushJsonbValue(&ra->jbArrayState, WJB_BEGIN_ARRAY, NULL);
| ^~~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: passing argument to parameter 'pstate' here
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ^
jsquery_op.c:52:17: error: incompatible pointer types passing 'JsonbParseState **' (aka 'struct JsonbParseState **') to parameter of type 'JsonbInState *' (aka 'struct JsonbInState *')
[-Wincompatible-pointer-types]
52 | pushJsonbValue(&ra->jbArrayState, WJB_ELEM, jb);
| ^~~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: passing argument to parameter 'pstate' here
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ^
jsquery_op.c:68:43: error: incompatible pointer types passing 'JsonbParseState **' (aka 'struct JsonbParseState **') to parameter of type 'JsonbInState *' (aka 'struct JsonbInState *')
[-Wincompatible-pointer-types]
68 | value = JsonbValueToJsonb(pushJsonbValue(&b, WJB_END_ARRAY, NULL));
| ^~
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: passing argument to parameter 'pstate' here
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ^
jsquery_op.c:68:28: error: passing 'void' to parameter of incompatible type 'JsonbValue *' (aka 'struct JsonbValue *')
68 | value = JsonbValueToJsonb(pushJsonbValue(&b, WJB_END_ARRAY, NULL));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:440:45: note: passing argument to parameter 'val' here
440 | extern Jsonb *JsonbValueToJsonb(JsonbValue *val);
| ^
jsquery_op.c:73:19: error: incompatible pointer types passing 'JsonbParseState **' (aka 'struct JsonbParseState **') to parameter of type 'JsonbInState *' (aka 'struct JsonbInState *')
[-Wincompatible-pointer-types]
73 | pushJsonbValue(&ra->jbArrayState, WJB_ELEM, &v);
| ^~~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: passing argument to parameter 'pstate' here
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ^
jsquery_op.c:852:20: error: incompatible pointer types passing 'JsonbParseState **' (aka 'struct JsonbParseState **') to parameter of type 'JsonbInState *' (aka 'struct JsonbInState *')
[-Wincompatible-pointer-types]
852 | pushJsonbValue(&ra.jbArrayState, WJB_END_ARRAY, NULL)
| ^~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: passing argument to parameter 'pstate' here
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ^
jsquery_op.c:852:5: error: passing 'void' to parameter of incompatible type 'JsonbValue *' (aka 'struct JsonbValue *')
852 | pushJsonbValue(&ra.jbArrayState, WJB_END_ARRAY, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/pgsql-19/include/server/utils/jsonb.h:440:45: note: passing argument to parameter 'val' here
440 | extern Jsonb *JsonbValueToJsonb(JsonbValue *val);
| ^
7 errors generated.
make[1]: *** [/usr/pgsql-19/lib/pgxs/src/makefiles/../../src/Makefile.global:1103: jsquery_op.bc] Error 1
make[1]: *** Waiting for unfinished jobs....
jsquery_op.c: In function ‘appendResult’:
jsquery_op.c:50:32: error: passing argument 1 of ‘pushJsonbValue’ from incompatible pointer type [-Wincompatible-pointer-types]
50 | pushJsonbValue(&ra->jbArrayState, WJB_BEGIN_ARRAY, NULL);
| ^~~~~~~~~~~~~~~~~
| |
| JsonbParseState **
In file included from jsquery.h:22,
from jsquery_op.c:31:
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: expected ‘JsonbInState *’ but argument is of type ‘JsonbParseState **’
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ~~~~~~~~~~~~~~^~~~~~
jsquery_op.c:52:24: error: passing argument 1 of ‘pushJsonbValue’ from incompatible pointer type [-Wincompatible-pointer-types]
52 | pushJsonbValue(&ra->jbArrayState, WJB_ELEM, jb);
| ^~~~~~~~~~~~~~~~~
| |
| JsonbParseState **
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: expected ‘JsonbInState *’ but argument is of type ‘JsonbParseState **’
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ~~~~~~~~~~~~~~^~~~~~
jsquery_op.c: In function ‘concatResult’:
jsquery_op.c:68:50: error: passing argument 1 of ‘pushJsonbValue’ from incompatible pointer type [-Wincompatible-pointer-types]
68 | value = JsonbValueToJsonb(pushJsonbValue(&b, WJB_END_ARRAY, NULL));
| ^~
| |
| JsonbParseState **
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: expected ‘JsonbInState *’ but argument is of type ‘JsonbParseState **’
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ~~~~~~~~~~~~~~^~~~~~
jsquery_op.c:68:35: error: invalid use of void expression
68 | value = JsonbValueToJsonb(pushJsonbValue(&b, WJB_END_ARRAY, NULL));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jsquery_op.c:73:40: error: passing argument 1 of ‘pushJsonbValue’ from incompatible pointer type [-Wincompatible-pointer-types]
73 | pushJsonbValue(&ra->jbArrayState, WJB_ELEM, &v);
| ^~~~~~~~~~~~~~~~~
| |
| JsonbParseState **
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: expected ‘JsonbInState *’ but argument is of type ‘JsonbParseState **’
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ~~~~~~~~~~~~~~^~~~~~
jsquery_op.c: In function ‘json_jsquery_filter’:
jsquery_op.c:852:48: error: passing argument 1 of ‘pushJsonbValue’ from incompatible pointer type [-Wincompatible-pointer-types]
852 | pushJsonbValue(&ra.jbArrayState, WJB_END_ARRAY, NULL)
| ^~~~~~~~~~~~~~~~
| |
| JsonbParseState **
/usr/pgsql-19/include/server/utils/jsonb.h:434:42: note: expected ‘JsonbInState *’ but argument is of type ‘JsonbParseState **’
434 | extern void pushJsonbValue(JsonbInState *pstate,
| ~~~~~~~~~~~~~~^~~~~~
jsquery_op.c:852:33: error: invalid use of void expression
852 | pushJsonbValue(&ra.jbArrayState, WJB_END_ARRAY, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [<builtin>: jsquery_op.o] Error 1
Hi,
1.2 fails to build against PostgreSQL 19 beta 1. Can you please take a look? Thanks! Devrim
Per pgdg-packaging/pgdg-rpms#213