diff Python/getargs.c @ 5317:c72c7e1930b3 legacy-trunk

Keep gcc -Wall and Microsoft VC happy.
author Guido van Rossum <guido@python.org>
date Fri, 11 Apr 1997 20:37:35 +0000
parents 4fa19659591e
children 5880384d7c71
line wrap: on
line diff
--- a/Python/getargs.c	Fri Apr 11 20:27:03 1997 +0000
+++ b/Python/getargs.c	Fri Apr 11 20:37:35 1997 +0000
@@ -453,7 +453,7 @@
 			if (ival == -1 && err_occurred())
 				return "integer<b>";
 			else
-				*p = ival;
+				*p = (char) ival;
 			break;
 		}
 	
@@ -464,7 +464,7 @@
 			if (ival == -1 && err_occurred())
 				return "integer<h>";
 			else
-				*p = ival;
+				*p = (short) ival;
 			break;
 		}
 	
@@ -497,7 +497,7 @@
 			if (err_occurred())
 				return "float<f>";
 			else
-				*p = dval;
+				*p = (float) dval;
 			break;
 		}
 	
@@ -548,7 +548,7 @@
 				*q = getstringsize(arg);
 				format++;
 			}
-			else if (strlen(*p) != getstringsize(arg))
+			else if ((int)strlen(*p) != getstringsize(arg))
 				return "string without null bytes";
 			break;
 		}
@@ -571,7 +571,7 @@
 				format++;
 			}
 			else if (*p != NULL &&
-				 strlen(*p) != getstringsize(arg))
+				 (int)strlen(*p) != getstringsize(arg))
 				return "None or string without null bytes";
 			break;
 		}