Removed unsigned/signed mismatches.

This commit is contained in:
Michael Meskes 2009-05-20 16:49:23 +00:00
parent 11a497f99a
commit 14f29f640a
4 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;