summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg
diff options
context:
space:
mode:
authorPeter Eisentraut2024-11-28 07:19:22 +0000
committerPeter Eisentraut2024-11-28 07:27:20 +0000
commit7f798aca1d5df290aafad41180baea0ae311b4ee (patch)
treeb4c8132ec85c21f6c72308b5857defd70958de69 /src/interfaces/ecpg
parent97525bc5c8ffb31475d23955d08e9ec9c1408f33 (diff)
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/interfaces/ecpg')
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c2
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c4
-rw-r--r--src/interfaces/ecpg/ecpglib/memory.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index b24b310ce59..2bbb70333dc 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -667,7 +667,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
this->autocommit = autocommit;
- PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, (void *) this);
+ PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, this);
return true;
}
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index aee888432f0..8525a6812f2 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -435,7 +435,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
/* allocate storage if needed */
if (arrsize == 0 && *(void **) var == NULL)
{
- void *mem = (void *) ecpg_auto_alloc(offset * ntuples, lineno);
+ void *mem = ecpg_auto_alloc(offset * ntuples, lineno);
if (!mem)
{
@@ -540,7 +540,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
/* allocate storage if needed */
if (data_var.ind_arrsize == 0 && data_var.ind_value == NULL)
{
- void *mem = (void *) ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
+ void *mem = ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
if (!mem)
{
diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c
index a83637ac758..6979be2c988 100644
--- a/src/interfaces/ecpg/ecpglib/memory.c
+++ b/src/interfaces/ecpg/ecpglib/memory.c
@@ -100,7 +100,7 @@ set_auto_allocs(struct auto_mem *am)
char *
ecpg_auto_alloc(long size, int lineno)
{
- void *ptr = (void *) ecpg_alloc(size, lineno);
+ void *ptr = ecpg_alloc(size, lineno);
if (!ptr)
return NULL;