changeset 359:f318407d2469

Fix some signedness mismatches Use size_t instead of int for stuff that's going to be compared with the strlen() return value. While not technically wrong to use int, it does seem to attract warnings from some compilers. Technically, since it's also the return value from strtol(), there should be one variable that is long and another that is size_t but that's just getting crazy. Thanks to Erik G <erik@6809.org> for pointing these ones out.
author William Astle <lost@l-w.ca>
date Tue, 26 May 2015 17:49:26 -0600
parents fa3659ffa834
children ade217fd76a5
files lwasm/pseudo.c
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/pseudo.c	Tue May 26 17:41:22 2015 -0600
+++ b/lwasm/pseudo.c	Tue May 26 17:49:26 2015 -0600
@@ -19,6 +19,8 @@
 
 */
 
+#include "lwasm.h"
+
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -27,7 +29,6 @@
 
 #include <lw_alloc.h>
 
-#include "lwasm.h"
 #include "instab.h"
 #include "input.h"
 
@@ -1770,7 +1771,7 @@
 	char *arg0;
 	char *arg1;
 	char *arg2;
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1796,7 +1797,7 @@
 	char *arg0;
 	char *arg1;
 	char *arg2;
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1822,7 +1823,7 @@
 	char *arg0;
 	char *arg1;
 	char *arg2;
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1848,7 +1849,7 @@
 	char *arg0;
 	char *arg1;
 	char *arg2;
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1877,7 +1878,7 @@
 	char *rarg1;
 	char *rarg2;
 	
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1912,7 +1913,7 @@
 	char *rarg1;
 	char *rarg2;
 	
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1949,7 +1950,7 @@
 	char *rarg1;
 	char *rarg2;
 	
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);
@@ -1985,7 +1986,7 @@
 	char *rarg1;
 	char *rarg2;
 	
-	int plen;
+	size_t plen;
 	int c = 0;
 	
 	arg0 = strcond_parsearg(p);