aports/community/slony1/gcc14.patch

28 lines
1.4 KiB
Diff

Source: https://sources.debian.org/patches/slony1-2/2.2.11-4/gcc14/
Fix -Wint-conversion error with gcc 14.
```
In file included from /usr/include/postgresql/16/server/postgres.h:46,
from slony1_funcs.c:13:
slony1_funcs.c: In function 'getClusterStatus':
slony1_funcs.c:2515:100: error: passing argument 1 of 'DatumGetCString' makes integer from pointer without a cast [-Wint-conversion]
2515 | elog(ERROR, "Slony-I: Node is uninitialized - cluster %s", DatumGetCString(cluster_name));
| ^~~~~~~~~~~~
| |
| Name {aka struct nameData *}
```
---
--- a/src/backend/slony1_funcs.c
+++ b/src/backend/slony1_funcs.c
@@ -2512,7 +2512,7 @@ getClusterStatus(Name cluster_name, int
SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
SPI_freetuptable(SPI_tuptable);
if (cs->localNodeId < 0)
- elog(ERROR, "Slony-I: Node is uninitialized - cluster %s", DatumGetCString(cluster_name));
+ elog(ERROR, "Slony-I: Node is uninitialized - cluster %s", NameStr(*cluster_name));
/*
* Initialize the currentXid to invalid