@@ -1083,15 +1083,15 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
1083
1083
}
1084
1084
1085
1085
static void
1086
- free_params (const char * * paramValues ,int nParams ,bool print ,int lineno )
1086
+ free_params (char * * paramValues ,int nParams ,bool print ,int lineno )
1087
1087
{
1088
1088
int n ;
1089
1089
1090
1090
for (n = 0 ;n < nParams ;n ++ )
1091
1091
{
1092
1092
if (print )
1093
1093
ecpg_log ("free_params on line %d: parameter %d = %s\n" ,lineno ,n + 1 ,paramValues [n ] ?paramValues [n ] :"null" );
1094
- ecpg_free (( void * ) ( paramValues [n ]) );
1094
+ ecpg_free (paramValues [n ]);
1095
1095
}
1096
1096
ecpg_free (paramValues );
1097
1097
}
@@ -1138,7 +1138,7 @@ ecpg_execute(struct statement * stmt)
1138
1138
PGnotify * notify ;
1139
1139
struct variable * var ;
1140
1140
int desc_counter = 0 ;
1141
- const char * * paramValues = NULL ;
1141
+ char * * paramValues = NULL ;
1142
1142
int nParams = 0 ;
1143
1143
int position = 0 ;
1144
1144
struct sqlca_t * sqlca = ECPGget_sqlca ();
@@ -1380,7 +1380,7 @@ ecpg_execute(struct statement * stmt)
1380
1380
else
1381
1381
{
1382
1382
nParams ++ ;
1383
- if (!(paramValues = (const char * * )ecpg_realloc (paramValues ,sizeof (const char * )* nParams ,stmt -> lineno )))
1383
+ if (!(paramValues = (char * * )ecpg_realloc (paramValues ,sizeof (char * )* nParams ,stmt -> lineno )))
1384
1384
{
1385
1385
ecpg_free (paramValues );
1386
1386
return false;
@@ -1441,7 +1441,7 @@ ecpg_execute(struct statement * stmt)
1441
1441
ecpg_log ("ecpg_execute on line %d: query: %s; with %d parameter(s) on connection %s\n" ,stmt -> lineno ,stmt -> command ,nParams ,stmt -> connection -> name );
1442
1442
if (stmt -> statement_type == ECPGst_execute )
1443
1443
{
1444
- results = PQexecPrepared (stmt -> connection -> connection ,stmt -> name ,nParams ,paramValues ,NULL ,NULL ,0 );
1444
+ results = PQexecPrepared (stmt -> connection -> connection ,stmt -> name ,nParams ,( const char * const * ) paramValues ,NULL ,NULL ,0 );
1445
1445
ecpg_log ("ecpg_execute on line %d: using PQexecPrepared for \"%s\"\n" ,stmt -> lineno ,stmt -> command );
1446
1446
}
1447
1447
else
@@ -1453,7 +1453,7 @@ ecpg_execute(struct statement * stmt)
1453
1453
}
1454
1454
else
1455
1455
{
1456
- results = PQexecParams (stmt -> connection -> connection ,stmt -> command ,nParams ,NULL ,paramValues ,NULL ,NULL ,0 );
1456
+ results = PQexecParams (stmt -> connection -> connection ,stmt -> command ,nParams ,NULL ,( const char * const * ) paramValues ,NULL ,NULL ,0 );
1457
1457
ecpg_log ("ecpg_execute on line %d: using PQexecParams\n" ,stmt -> lineno );
1458
1458
}
1459
1459
}