From 99b3a18f82cdeb221ae0b817e0c5d71ba31fd273 Mon Sep 17 00:00:00 2001
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date: Mon, 21 May 2007 15:48:52 +0100
Subject: [PATCH] Fix a -Wtypesign bug.


Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 evaluate.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/evaluate.c b/evaluate.c
index ca49ed0..5308827 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -669,7 +669,7 @@ const char * type_difference(struct symbol *target, struct symbol *source,
 			target = target->ctype.base_type;
 			if (!target)
 				return "bad types";
-			if (target->type == SYM_PTR) {
+			if (target->type == SYM_PTR || target->type == SYM_FN) {
 				mod1 = 0;
 				as1 = 0;
 			}	
@@ -680,7 +680,7 @@ const char * type_difference(struct symbol *target, struct symbol *source,
 			source = source->ctype.base_type;
 			if (!source)
 				return "bad types";
-			if (source->type == SYM_PTR) {
+			if (source->type == SYM_PTR || source->type == SYM_FN) {
 				mod2 = 0;
 				as2 = 0;
 			}
@@ -718,6 +718,7 @@ const char * type_difference(struct symbol *target, struct symbol *source,
 			case SYM_FN:
 				type1 = SYM_FN;
 				target = base1;
+				mod1 = target->ctype.modifiers;
 				base1 = base1->ctype.base_type;
 			default:
 				/* nothing */;
@@ -729,6 +730,7 @@ const char * type_difference(struct symbol *target, struct symbol *source,
 			case SYM_FN:
 				type2 = SYM_FN;
 				source = base2;
+				mod2 = source->ctype.modifiers;
 				base2 = base2->ctype.base_type;
 			default:
 				/* nothing */;
-- 
1.5.1

