When compiling the GLPK 4.56 I observed several warnings. This patch fixes the warnings concerning src/glpsql.c.
A lot of warnings remain. Please, check the compiler output of Visual C++. The changes in this patch comprise: * eliminate unused variable ret * use size_t for strlen return values * eliminate unused return value of db_escape_string Signed-off-by: Heinrich Schuchardt <[email protected]> --- src/glpsql.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/glpsql.c b/src/glpsql.c index 8cd5cd0..9c664db 100644 --- a/src/glpsql.c +++ b/src/glpsql.c @@ -86,11 +86,10 @@ static char **args_concat(TABDCA *dca) int j; int j0; int j1; - int len; + size_t len; int lentot; int narg; int nline = 0; - void *ret; char **sqllines = NULL; narg = mpl_tab_num_args(dca); @@ -184,12 +183,12 @@ static int db_escaped_string_length(const char* from) return count; } -static int db_escape_string (char *to, const char *from) +static void db_escape_string (char *to, const char *from) /* escape string*/ { const char *source = from; char *target = to; - unsigned int remaining; + size_t remaining; remaining = strlen(from); @@ -216,8 +215,6 @@ static int db_escape_string (char *to, const char *from) /* Write the terminating NUL character. */ *target = '\0'; - - return target - to; } static char *db_generate_select_stmt(TABDCA *dca) -- 1.7.10.4 _______________________________________________ Bug-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-glpk
