aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c4
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/numeric.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index 8525a6812f2..651d5c8b2ed 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -198,7 +198,7 @@ get_char_item(int lineno, void *var, enum ECPGttype vartype, char *value, int va
case ECPGt_char:
case ECPGt_unsigned_char:
case ECPGt_string:
- strncpy((char *) var, value, varcharsize);
+ strncpy(var, value, varcharsize);
break;
case ECPGt_varchar:
{
@@ -597,7 +597,7 @@ set_desc_attr(struct descriptor_item *desc_item, struct variable *var,
}
ecpg_free(desc_item->data); /* free() takes care of a potential NULL value */
- desc_item->data = (char *) tobeinserted;
+ desc_item->data = tobeinserted;
}
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index b5089eac787..f52da06de9a 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -278,7 +278,7 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
isarray = ECPG_ARRAY_NONE;
else
{
- isarray = (atoi((char *) PQgetvalue(query, 0, 0)) == -1) ? ECPG_ARRAY_ARRAY : ECPG_ARRAY_VECTOR;
+ isarray = (atoi(PQgetvalue(query, 0, 0)) == -1) ? ECPG_ARRAY_ARRAY : ECPG_ARRAY_VECTOR;
if (ecpg_dynamic_type(type) == SQL3_CHARACTER ||
ecpg_dynamic_type(type) == SQL3_CHARACTER_VARYING)
{
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index 35e7b92da40..bb2a86981ca 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -232,7 +232,7 @@ get_str_from_var(numeric *var, int dscale)
if (var->sign == NUMERIC_NAN)
{
- str = (char *) pgtypes_alloc(4);
+ str = pgtypes_alloc(4);
if (str == NULL)
return NULL;
sprintf(str, "NaN");
@@ -269,7 +269,7 @@ get_str_from_var(numeric *var, int dscale)
/*
* Allocate space for the result
*/
- if ((str = (char *) pgtypes_alloc(Max(0, dscale) + Max(0, var->weight) + 4)) == NULL)
+ if ((str = pgtypes_alloc(Max(0, dscale) + Max(0, var->weight) + 4)) == NULL)
return NULL;
cp = str;