aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c1
-rw-r--r--src/interfaces/ecpg/ecpglib/typename.c2
-rw-r--r--src/interfaces/ecpg/pgtypeslib/datetime.c1
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c1
-rw-r--r--src/interfaces/ecpg/pgtypeslib/numeric.c1
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c1
-rw-r--r--src/interfaces/ecpg/preproc/type.c4
-rw-r--r--src/interfaces/libpq/fe-auth.c4
-rw-r--r--src/interfaces/libpq/fe-connect.c8
-rw-r--r--src/interfaces/libpq/fe-exec.c6
-rw-r--r--src/interfaces/libpq/fe-print.c3
-rw-r--r--src/interfaces/libpq/fe-protocol3.c2
-rw-r--r--src/interfaces/libpq/libpq-events.h2
13 files changed, 15 insertions, 21 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 3b30864866b..d6de3eac997 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -311,7 +311,6 @@ deccvlong(long lng, decimal *np)
int
decdiv(decimal *n1, decimal *n2, decimal *result)
{
-
int i;
errno = 0;
diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c
index d0081812f3d..db65ec10f18 100644
--- a/src/interfaces/ecpg/ecpglib/typename.c
+++ b/src/interfaces/ecpg/ecpglib/typename.c
@@ -65,7 +65,7 @@ ecpg_type_name(enum ECPGttype typ)
default:
abort();
}
- return ""; /* keep MSC compiler happy */
+ return ""; /* keep MSC compiler happy */
}
int
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index 823626fcf56..6600759220e 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -52,7 +52,6 @@ PGTYPESdate_from_timestamp(timestamp dt)
date
PGTYPESdate_from_asc(char *str, char **endptr)
{
-
date dDate;
fsec_t fsec;
struct tm tt,
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index bcc10eeafd1..efa775de15a 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -801,7 +801,6 @@ AppendSeconds(char *cp, int sec, fsec_t fsec, int precision, bool fillzeros)
int
EncodeInterval(struct /* pg_ */ tm * tm, fsec_t fsec, int style, char *str)
{
-
char *cp = str;
int year = tm->tm_year;
int mon = tm->tm_mon;
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index 7257c812542..c56dda026ac 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -1362,7 +1362,6 @@ done:
int
PGTYPESnumeric_cmp(numeric *var1, numeric *var2)
{
-
/* use cmp_abs function to calculate the result */
/* both are positive: normal comparation with cmp_abs */
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index cccd2814d2c..36e811eba97 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -949,7 +949,6 @@ int
PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout)
{
-
if (TIMESTAMP_NOT_FINITE(*tin))
*tout = *tin;
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index cf2ff158413..5f0b20e2b1a 100644
--- a/src/interfaces/ecpg/preproc/type.c
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -506,8 +506,8 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz,
*/
struct ECPGstruct_member *p,
*ind_p = NULL;
- char *pbuf = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 3);
- char *ind_pbuf = (char *) mm_alloc(strlen(ind_name) + ((ind_prefix == NULL) ? 0 : strlen(ind_prefix)) + 3);
+ char *pbuf = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 3);
+ char *ind_pbuf = (char *) mm_alloc(strlen(ind_name) + ((ind_prefix == NULL) ? 0 : strlen(ind_prefix)) + 3);
if (atoi(arrsiz) == 1)
sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index c8ff40ac5cb..5666a6b8dd8 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -244,7 +244,7 @@ pg_krb5_sendauth(PGconn *conn)
}
retval = krb5_sendauth(info.pg_krb5_context, &auth_context,
- (krb5_pointer) &conn->sock, (char *) conn->krbsrvname,
+ (krb5_pointer) & conn->sock, (char *) conn->krbsrvname,
info.pg_krb5_client, server,
AP_OPTS_MUTUAL_REQUIRED,
NULL, 0, /* no creds, use ccache instead */
@@ -285,7 +285,7 @@ pg_krb5_sendauth(PGconn *conn)
char sebuf[256];
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("could not restore nonblocking mode on socket: %s\n"),
+ libpq_gettext("could not restore nonblocking mode on socket: %s\n"),
pqStrerror(errno, sebuf, sizeof(sebuf)));
ret = STATUS_ERROR;
}
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index ae9dfaa0add..0d729c88b0c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -162,7 +162,7 @@ typedef struct _internalPQconninfoOption
* ---
*/
off_t connofs; /* Offset into PGconn struct, -1 if not there */
-} internalPQconninfoOption;
+} internalPQconninfoOption;
static const internalPQconninfoOption PQconninfoOptions[] = {
/*
@@ -389,7 +389,7 @@ pgthreadlock_t pg_g_threadlock = default_threadlock;
* pqDropConnection
*
* Close any physical connection to the server, and reset associated
- * state inside the connection object. We don't release state that
+ * state inside the connection object. We don't release state that
* would be needed to reconnect, though.
*/
void
@@ -1376,8 +1376,8 @@ connectDBStart(PGconn *conn)
{
appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"),
- portstr,
- (int) (UNIXSOCK_PATH_BUFLEN - 1));
+ portstr,
+ (int) (UNIXSOCK_PATH_BUFLEN - 1));
conn->options_valid = false;
goto connect_errReturn;
}
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 26c964e5c3c..5abccf443ed 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -1181,7 +1181,7 @@ PQsendQueryParams(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
@@ -1227,7 +1227,7 @@ PQsendPrepare(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
@@ -1322,7 +1322,7 @@ PQsendQueryPrepared(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index b0fab6a839f..2fb4de36634 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -329,7 +329,6 @@ do_field(const PQprintOpt *po, const PGresult *res,
unsigned char *fieldNotNum, int *fieldMax,
const int fieldMaxLen, FILE *fout)
{
-
const char *pval,
*p;
int plen;
@@ -441,7 +440,6 @@ do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
const char **fieldNames, unsigned char *fieldNotNum,
const int fs_len, const PGresult *res)
{
-
int j; /* for loop index */
char *border = NULL;
@@ -528,7 +526,6 @@ output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
unsigned char *fieldNotNum, int *fieldMax, char *border,
const int row_index)
{
-
int field_index; /* for loop index */
if (po->html3)
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index a7d4f40d38a..b6316803dd4 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -1467,6 +1467,7 @@ getCopyDataMessage(PGconn *conn)
case 'd': /* Copy Data, pass it back to caller */
return msgLength;
case 'c':
+
/*
* If this is a CopyDone message, exit COPY_OUT mode and let
* caller read status with PQgetResult(). If we're in
@@ -1478,6 +1479,7 @@ getCopyDataMessage(PGconn *conn)
conn->asyncStatus = PGASYNC_BUSY;
return -1;
default: /* treat as end of copy */
+
/*
* Any other message terminates either COPY_IN or COPY_BOTH
* mode.
diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h
index f05c873f724..44b3347eedf 100644
--- a/src/interfaces/libpq/libpq-events.h
+++ b/src/interfaces/libpq/libpq-events.h
@@ -24,7 +24,7 @@ extern "C"
#endif
/* Callback Event Ids */
- typedef enum
+typedef enum
{
PGEVT_REGISTER,
PGEVT_CONNRESET,