diff --git a/src/modules/Image/encodings/tga.c b/src/modules/Image/encodings/tga.c
index 8e7113463b80d4690aabf09618d30222718aea88..0831029da2cf5768c97a1c548d018f901acd18bf 100644
--- a/src/modules/Image/encodings/tga.c
+++ b/src/modules/Image/encodings/tga.c
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tga.c,v 1.23 2000/08/16 19:54:05 grubba Exp $
+ * $Id: tga.c,v 1.24 2000/08/31 21:26:08 grubba Exp $
  *
  *  Targa codec for pike. Based on the tga plugin for gimp.
  *
@@ -81,7 +81,7 @@
 #include "module_magic.h"
 
 
-RCSID("$Id: tga.c,v 1.23 2000/08/16 19:54:05 grubba Exp $");
+RCSID("$Id: tga.c,v 1.24 2000/08/31 21:26:08 grubba Exp $");
 
 #ifndef MIN
 # define MIN(X,Y) ((X)<(Y)?(X):(Y))
@@ -651,9 +651,9 @@ static struct image_alpha ReadImage(struct buffer *fp, struct tga_header *hdr)
         for(x = 0; x<width; x++)
         {
           unsigned short pixel = extract_le_short(&sd);
-          id->b = c5to8bit( pixel&31 );
-          id->g = c5to8bit((pixel & 922)>>5);
-          id->r = c5to8bit((pixel & 31744)>>10);
+          id->b = c5to8bit((unsigned char)(pixel & 31));
+          id->g = c5to8bit((unsigned char)((pixel & 922)>>5));
+          id->r = c5to8bit((unsigned char)((pixel & 31744)>>10));
           id++;
         }
     }
diff --git a/src/modules/Odbc/odbc.c b/src/modules/Odbc/odbc.c
index 879cbaa5604bf91991aa1a45ff0c1327b5065956..56f534428f7f28603237621238656f35481bb3d4 100644
--- a/src/modules/Odbc/odbc.c
+++ b/src/modules/Odbc/odbc.c
@@ -1,5 +1,5 @@
 /*
- * $Id: odbc.c,v 1.20 2000/08/31 12:36:23 grubba Exp $
+ * $Id: odbc.c,v 1.21 2000/08/31 21:32:58 grubba Exp $
  *
  * Pike interface to ODBC compliant databases.
  *
@@ -16,7 +16,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-RCSID("$Id: odbc.c,v 1.20 2000/08/31 12:36:23 grubba Exp $");
+RCSID("$Id: odbc.c,v 1.21 2000/08/31 21:32:58 grubba Exp $");
 
 #include "interpret.h"
 #include "object.h"
@@ -234,11 +234,11 @@ static void f_create(INT32 args)
   }
   odbc_check_error("odbc->create", "Connect failed",
 		   SQLConnect(PIKE_ODBC->hdbc, (unsigned char *)server->str,
-			      DO_NOT_WARN(server->len),
+			      DO_NOT_WARN((SQLSMALLINT)server->len),
 			      (unsigned char *)user->str,
-			      DO_NOT_WARN(user->len),
+			      DO_NOT_WARN((SQLSMALLINT)user->len),
 			      (unsigned char *)pwd->str,
-			      DO_NOT_WARN(pwd->len)),
+			      DO_NOT_WARN((SQLSMALLINT)pwd->len)),
 		   NULL);
   PIKE_ODBC->flags |= PIKE_ODBC_CONNECTED;
   pop_n_elems(args);
diff --git a/src/modules/Odbc/odbc_result.c b/src/modules/Odbc/odbc_result.c
index 6f897371067cfc178ff9bab75cb0afed86fd008e..dd77fb95e7d5cc1271e15dc4a105f08e606fbd2a 100644
--- a/src/modules/Odbc/odbc_result.c
+++ b/src/modules/Odbc/odbc_result.c
@@ -1,5 +1,5 @@
 /*
- * $Id: odbc_result.c,v 1.21 2000/08/31 12:40:15 grubba Exp $
+ * $Id: odbc_result.c,v 1.22 2000/08/31 21:31:56 grubba Exp $
  *
  * Pike  interface to ODBC compliant databases
  *
@@ -16,7 +16,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-RCSID("$Id: odbc_result.c,v 1.21 2000/08/31 12:40:15 grubba Exp $");
+RCSID("$Id: odbc_result.c,v 1.22 2000/08/31 21:31:56 grubba Exp $");
 
 #include "interpret.h"
 #include "object.h"
@@ -147,7 +147,7 @@ static void odbc_fix_fields(void)
       odbc_check_error("odbc_fix_fields", "Failed to fetch field info",
 		       SQLDescribeCol(PIKE_ODBC_RES->hstmt, i+1,
 				      buf,
-				      DO_NOT_WARN(buf_size),
+				      DO_NOT_WARN((SQLSMALLINT)buf_size),
 				      &name_len,
 				      &sql_type, &precision, &scale, &nullable),
 		       0);
@@ -375,7 +375,7 @@ static void f_fetch_row(INT32 args)
 	SQLLEN len = 0;
 
 	while(1) {
-	  code = SQLGetData(PIKE_ODBC_RES->hstmt, i+1,
+	  code = SQLGetData(PIKE_ODBC_RES->hstmt, (SQLUSMALLINT)(i+1),
 			    PIKE_ODBC_RES->field_info[i].type,
 			    buf, BLOB_BUFSIZ, &len);
 	  if (code == SQL_NO_DATA_FOUND) {