diff --git a/src/command_line.py b/src/command_line.py index 549b8ae..00c27fa 100644 --- a/src/command_line.py +++ b/src/command_line.py @@ -47,6 +47,7 @@ options['l'] = [ 'align' , 'Align arrays using compiler directives. Sets options['s'] = [ 'substitute' , 'Substitute values for loop max values', 1 ] options['r'] = [ 'no_directives', 'Ignore compiler directives !DEC$ and !DIR$', 0 ] options['n'] = [ 'inline' , 'all|providers|builders : Force inlining of providers or builders', 1 ] +options['u'] = [ 'unused' , 'Print unused providers', 0 ] class CommandLine(object): diff --git a/src/variable.py b/src/variable.py index e07f2d5..f9eb512 100644 --- a/src/variable.py +++ b/src/variable.py @@ -618,6 +618,8 @@ class Variable(object): from variables import variables if '_needed_by' not in self.__dict__: import parsed_text + if command_line.do_unused and self.needed_by == []: + error.warn(None, "Provider %s is not used"%self.name) result = [] for x in self.needed_by: result.append(x)