From 59db90d17760536976443e8170d46e290b8dcafd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 5 Mar 2020 14:48:53 +0900 Subject: [PATCH] [qfcc] Fix method not found warnings It turns out they should not be optional, but do need to be smarter about when and which. So another two FIXMEs gone :) --- tools/qfcc/source/class.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c index 60cfe27ca..574a484b9 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -1136,19 +1136,15 @@ class_message_response (class_t *class, int class_msg, expr_t *sel) } c = c->super_class; } - //FIXME right option? - if (options.warnings.interface_check) - warning (sel, "%s may not respond to %c%s", class->name, - class_msg ? '+' : '-', selector->name); + warning (sel, "%s may not respond to %c%s", class->name, + class_msg ? '+' : '-', selector->name); } m = find_method (selector->name); - if (m) - return m; - //FIXME right option? - if (options.warnings.interface_check) + if (!m && (!class || class->type == &type_obj_object)) { warning (sel, "could not find method for %c%s", class_msg ? '+' : '-', selector->name); - return 0; + } + return m; } static uintptr_t