From: Michael Meskes Date: Wed, 20 May 2009 16:49:23 +0000 (+0000) Subject: Removed unsigned/signed mismatches. X-Git-Tag: REL8_4_RC1~90 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14f29f640a4338650a19f68d9f426d0734353147;p=postgresql Removed unsigned/signed mismatches. --- diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index f58802ef36..9940c4195b 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.57 2009/01/15 11:52:54 petere Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.58 2009/05/20 16:49:23 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -151,7 +151,7 @@ static char * ecpg_strndup(const char *str, size_t len) { int real_len = strlen(str); - int use_len = (real_len > len) ? len : real_len; + int use_len = (real_len > len) ? (int)len : real_len; char *new = malloc(use_len + 1); diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 9363b5668f..80fa2f5505 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.83 2009/05/20 16:13:18 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.84 2009/05/20 16:49:23 meskes Exp $ */ /* * The aim is to get a simpler inteface to the database routines. @@ -759,7 +759,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari case ECPGt_unsigned_char: { /* set slen to string length if type is char * */ - int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : var->varcharsize; + int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : (unsigned int)var->varcharsize; if (!(newcopy = ecpg_alloc(slen + 1, lineno))) return false; diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c index eae776bf23..364aa0055c 100644 --- a/src/interfaces/ecpg/pgtypeslib/datetime.c +++ b/src/interfaces/ecpg/pgtypeslib/datetime.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.36 2009/05/20 16:13:18 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/datetime.c,v 1.37 2009/05/20 16:49:23 meskes Exp $ */ #include "postgres_fe.h" @@ -347,7 +347,7 @@ PGTYPESdate_defmt_asc(date * d, char *fmt, char *str) char *fmt_ystart, *fmt_mstart, *fmt_dstart; - int i; + unsigned int i; int reading_digit; int token_count; char *str_copy; diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index 20e0a9d311..e706fa6a49 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/dt_common.c,v 1.49 2009/05/20 16:13:18 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/dt_common.c,v 1.50 2009/05/20 16:49:23 meskes Exp $ */ #include "postgres_fe.h" @@ -2583,7 +2583,7 @@ PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d, *pfmt, *tmp; int err = 1; - int j; + unsigned int j; struct tm tm; pfmt = fmt;