Skip to contentSkip to conversation

Add type information to enum mismatch warning

PATCH Superseded Adam DiCarlo 1 participant 1 message Sep 1, 2006 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add type information to enum mismatch warning

---
 evaluate.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
evaluate.c +4 -1
index 177797a..3076d41 100644
@@ -253,8 +253,11 @@ warn_for_different_enum_types (struct po
 	if (typea == typeb)
 		return;
 
-	if (typea->type == SYM_ENUM && typeb->type == SYM_ENUM)
+	if (typea->type == SYM_ENUM && typeb->type == SYM_ENUM) {
 		warning(pos, "mixing different enum types");
+		info(pos, "    %s versus", show_typename(typea));
+		info(pos, "    %s", show_typename(typeb));
+	}
 }
 
 /*
Signature · 1 line
1.4.2.ga444