diff lwlib/lw_expr.c @ 2:7317fbe024af

Clean up insane number of compiler warnings under -Wall
author lost@l-w.ca
date Thu, 20 Jan 2011 22:39:46 -0700
parents 2c24602be78f
children 6b9991fb39b6
line wrap: on
line diff
--- a/lwlib/lw_expr.c	Wed Jan 19 22:31:00 2011 -0700
+++ b/lwlib/lw_expr.c	Thu Jan 20 22:39:46 2011 -0700
@@ -22,6 +22,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
+#include <ctype.h>
 
 #define ___lw_expr_c_seen___
 #include "lw_alloc.h"
@@ -111,7 +112,7 @@
 void lw_expr_add_operand(lw_expr_t E, lw_expr_t O);
 lw_expr_t lw_expr_copy(lw_expr_t E)
 {
-	lw_expr_t r, t;
+	lw_expr_t r;
 	struct lw_expr_opers *o;
 	
 	r = lw_alloc(sizeof(struct lw_expr_priv));
@@ -610,14 +611,12 @@
 	// merge plus operations
 	if (E -> value == lw_expr_oper_plus)
 	{
-		lw_expr_t e2;
-
 	tryagainplus:
 		for (o = E -> operands; o; o = o -> next)
 		{
 			if (o -> p -> type == lw_expr_type_oper && o -> p -> value == lw_expr_oper_plus)
 			{
-				struct lw_expr_opers *o2, *o3;
+				struct lw_expr_opers *o2;
 				// we have a + operation - bring operands up
 				
 				for (o2 = E -> operands; o2 && o2 -> next != o; o2 = o2 -> next)
@@ -640,14 +639,12 @@
 	// merge times operations
 	if (E -> value == lw_expr_oper_times)
 	{
-		lw_expr_t e2;
-
 	tryagaintimes:
 		for (o = E -> operands; o; o = o -> next)
 		{
 			if (o -> p -> type == lw_expr_type_oper && o -> p -> value == lw_expr_oper_times)
 			{
-				struct lw_expr_opers *o2, *o3;
+				struct lw_expr_opers *o2;
 				// we have a + operation - bring operands up
 				
 				for (o2 = E -> operands; o2 && o2 -> next != o; o2 = o2 -> next)