Author: Daniel Rus Morales <danirus@tol-project.org>
Description: Fix bug #435291 and warning messages due to deprecated char conversions
--- a/statemnt.cxx
+++ b/statemnt.cxx
@@ -50,8 +50,10 @@
 #include "tclodbc.hxx"
 
 TclStatement::TclStatement(TclDatabase& d) 
-    : TclCmdObject(), stmt(SQL_NULL_HSTMT), resultBuffer(NULL),
-      colCount(-1), colLabels(), pDb(&d), useMultipleResultSets(false) {
+  : TclCmdObject(), stmt(SQL_NULL_HSTMT), pDb(&d), 
+    useMultipleResultSets(false), colCount(-1), colLabels(), 
+    resultBuffer(NULL)
+{
     RETCODE rc;
 
     rc = SQLAllocStmt(d.DBC(), &stmt);
@@ -75,7 +77,7 @@
 };
 
 int TclStatement::Dispatch(Tcl_Interp *interp, int objc, TCL_CMDARGS) {
-    SDWORD count;
+    SQLLEN count;
 
     if (!pDb) {
         THROWSTR("Connection closed. Cannot execute.");
@@ -95,7 +97,7 @@
                 THROWSTR(strWrongArgs);
 	    }
             Tcl_DeleteCommandFromToken(interp, tclCommand);
-            Tcl_SetResult(interp, strOK, TCL_STATIC);
+            Tcl_SetResult(interp, (char*) strOK, TCL_STATIC);
             break;
 
         case COLUMNS:
@@ -111,7 +113,7 @@
                 THROWSTR("wrong # args, should be execute [args]");
 	    }
             Execute(interp, objc-2, objv+2);
-            Tcl_SetResult(interp, strOK, TCL_STATIC);
+            Tcl_SetResult(interp, (char*) strOK, TCL_STATIC);
             break;
 
         case MORERESULTS: {
@@ -184,7 +186,7 @@
 	    }
             SetOption(Tcl_GetStringFromObj(objv[2], NULL), 
 			          Tcl_GetStringFromObj(objv[3], NULL));
-            Tcl_SetResult(interp, strOK, TCL_STATIC);
+            Tcl_SetResult(interp, (char*) strOK, TCL_STATIC);
             break;
 
         case GET:
@@ -197,14 +199,14 @@
             if (objc < 3 || objc > 4)
                 THROWSTR("wrong # args, should be eval proc [args]")
             Eval(interp, TclObj(objv[2]), objc-3, objv+3);
-            Tcl_SetResult(interp, strOK, TCL_STATIC);
+            Tcl_SetResult(interp, (char*) strOK, TCL_STATIC);
             break;
 
         case READ:
             if (objc < 3 || objc > 4)
                 THROWSTR("wrong # args, should be read array [args]")
             Read(interp, TclObj(objv[2]), objc-3, objv+3);
-            Tcl_SetResult(interp, strOK, TCL_STATIC);
+            Tcl_SetResult(interp, (char*) strOK, TCL_STATIC);
             break;
 
         case ROWCOUNT:
@@ -358,9 +360,9 @@
 		result.appendElement(row);
 	    }
 	} else {
-	    long i;
-	    SQLRowCount(stmt, (SQLINTEGER *) &i);
-	    result = i;
+	    SQLLEN i;
+	    SQLRowCount(stmt, &i);
+	    result = (long) i;
 	}
 	return result;
     } else {
@@ -398,9 +400,9 @@
 
 
 	    } else {
-		long i;
-		SQLRowCount(stmt, (SQLINTEGER *) &i);
-		return i;
+		SQLLEN i;
+		SQLRowCount(stmt, &i);
+		return (long) i;
 	    }
 
 	} while(more);
@@ -502,7 +504,7 @@
 
 TclObj TclStatement::ColumnInfo(int col, UWORD attr) {
     char   strData [256];
-	SDWORD wordData;
+	SQLLEN wordData;
 
 	switch (attr) {
 	case SQL_COLUMN_LABEL:
@@ -526,7 +528,7 @@
 		if (SQLColAttributes(stmt, col, attr, 
 			NULL, 0, NULL, &wordData) == SQL_ERROR)
 			THROWOBJ(SqlErr(env, SQL_NULL_HDBC, stmt))
-        return TclObj(wordData);
+	return TclObj((long) wordData);
 		break;
 
 	default: 
