diff options
author | Michael Meskes <meskes@postgresql.org> | 2010-11-02 18:12:01 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2010-11-02 18:12:01 +0100 |
commit | 35d5d962e1777560baf6f5edec906a907a853c9a (patch) | |
tree | da8655d2409ebd61863735a1f321052eaedbc636 /src/interfaces/ecpg/compatlib/informix.c | |
parent | 8c843fff2d8db7889b81782ab4f3324cbda4ed2a (diff) | |
download | postgresql-35d5d962e1777560baf6f5edec906a907a853c9a.tar.gz postgresql-35d5d962e1777560baf6f5edec906a907a853c9a.zip |
Some cleanup in ecpg code:
Use bool as type for booleans instead of int.
Do not implicitely cast size_t to int.
Make the compiler stop complaining about unused variables by adding an empty statement.
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r-- | src/interfaces/ecpg/compatlib/informix.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 641f01adf5b..af185d533b9 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -178,8 +178,8 @@ deccopy(decimal *src, decimal *target) static char * ecpg_strndup(const char *str, size_t len) { - int real_len = strlen(str); - int use_len = (real_len > len) ? (int) len : real_len; + size_t real_len = strlen(str); + int use_len = (int) ((real_len > len) ? len : real_len); char *new = malloc(use_len + 1); @@ -983,24 +983,33 @@ ldchar(char *src, int len, char *dest) int rgetmsg(int msgnum, char *s, int maxsize) { + (void) msgnum; /* keep the compiler quiet */ + (void) s; /* keep the compiler quiet */ + (void) maxsize; /* keep the compiler quiet */ return 0; } int rtypalign(int offset, int type) { + (void) offset; /* keep the compiler quiet */ + (void) type; /* keep the compiler quiet */ return 0; } int rtypmsize(int type, int len) { + (void) type; /* keep the compiler quiet */ + (void) len; /* keep the compiler quiet */ return 0; } int rtypwidth(int sqltype, int sqllen) { + (void) sqltype; /* keep the compiler quiet */ + (void) sqllen; /* keep the compiler quiet */ return 0; } |