Improved warnings check

This commit is contained in:
Andrew Kane
2023-06-09 18:46:26 -07:00
parent f81d863dfd
commit cbec1b3f48
2 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ jobs:
dev-files: true
- run: make
env:
PG_CFLAGS: -Wall -Werror
PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter
- run: |
export PG_CONFIG=`which pg_config`
sudo --preserve-env=PG_CONFIG make install
@@ -47,7 +47,7 @@ jobs:
postgres-version: 14
- run: make
env:
PG_CFLAGS: -Wall -Werror
PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter
- run: make install
- run: make installcheck
- if: ${{ failure() }}
@@ -92,4 +92,4 @@ jobs:
sudo -u postgres make installcheck
sudo -u postgres make prove_installcheck
env:
PG_CFLAGS: -Wall -Werror
PG_CFLAGS: -Wall -Wextra -Werror -Wno-unused-parameter

View File

@@ -212,7 +212,7 @@ ElkanKmeans(Relation index, VectorArray samples, VectorArray centers)
/* Check memory requirements */
/* Add one to error message to ceil */
if (totalSize / 1024 > maintenance_work_mem)
if (totalSize > (Size) maintenance_work_mem * 1024L)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("memory required is %zu MB, maintenance_work_mem is %d MB",