From 1b34892d533f1536d81d4ba436bf2a9607bcfd3c Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Tue, 11 Apr 2000 22:48:42 +0000 Subject: [PATCH] Added warning message. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@406 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Swig/tree.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SWIG/Source/Swig/tree.c b/SWIG/Source/Swig/tree.c index 52992b976..09832e1e5 100644 --- a/SWIG/Source/Swig/tree.c +++ b/SWIG/Source/Swig/tree.c @@ -108,10 +108,13 @@ Swig_emit(DOH *obj, void *clientdata) { while (obj) { tag = Getattr(obj,"tag"); actionobj = Getattr(rules,tag); - if (!actionobj) return -1; - action = (int (*)(DOH *, void *)) Data(actionobj); - ret = (*action)(obj,clientdata); - if (ret < 0) return -1; + if (actionobj) { + action = (int (*)(DOH *, void *)) Data(actionobj); + ret = (*action)(obj,clientdata); + if (ret < 0) return -1; + } else { + Printf(stderr,"warning: no action defined for '%s'\n", tag); + } obj = Getattr(obj,"sibling"); } return 0;