aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/prepare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/prepare.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/prepare.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index c2725a231ab..90288d343bf 100644
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -100,7 +100,7 @@ replace_variables(char **text, int lineno)
}
static bool
-prepare_common(int lineno, struct connection * con, const bool questionmarks, const char *name, const char *variable)
+prepare_common(int lineno, struct connection * con, const char *name, const char *variable)
{
struct statement *stmt;
struct prepared_statement *this;
@@ -156,7 +156,7 @@ prepare_common(int lineno, struct connection * con, const bool questionmarks, co
}
/* handle the EXEC SQL PREPARE statement */
-/* questionmarks is not needed but remians in there for the time being to not change the API */
+/* questionmarks is not needed but remains in there for the time being to not change the API */
bool
ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
{
@@ -164,6 +164,7 @@ ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, c
struct prepared_statement *this,
*prev;
+ (void) questionmarks; /* quiet the compiler */
con = ecpg_get_connection(connection_name);
if (!ecpg_init(con, connection_name, lineno))
@@ -174,7 +175,7 @@ ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, c
if (this && !deallocate_one(lineno, ECPG_COMPAT_PGSQL, con, prev, this))
return false;
- return prepare_common(lineno, con, questionmarks, name, variable);
+ return prepare_common(lineno, con, name, variable);
}
struct prepared_statement *
@@ -304,6 +305,7 @@ ecpg_prepared(const char *name, struct connection * con)
char *
ECPGprepared_statement(const char *connection_name, const char *name, int lineno)
{
+ (void)lineno; /* keep the compiler quiet */
return ecpg_prepared(name, ecpg_get_connection(connection_name));
}
@@ -484,7 +486,7 @@ ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, cha
con = ecpg_get_connection(connection_name);
prep = ecpg_find_prepared_statement(stmtID, con, NULL);
/* This prepared name doesn't exist on this connection. */
- if (!prep && !prepare_common(lineno, con, 0, stmtID, query))
+ if (!prep && !prepare_common(lineno, con, stmtID, query))
return (false);
*name = ecpg_strdup(stmtID, lineno);