perf_counter tools: Introduce stricter C code checking
Tighten up our C code requirements:
- disallow warnings
- disallow declarations-mixed-with-statements
- require proper prototypes
- require C99 (with gcc extensions)
Fix up a ton of problems these measures unearth:
- unused functions
- needlessly global functions
- missing prototypes
- code mixed with declarations
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index e7cb941..ce661e2 100644
--- a/Documentation/perf_counter/builtin-stat.c
+++ b/Documentation/perf_counter/builtin-stat.c
@@ -30,6 +30,7 @@
*/
#include "perf.h"
+#include "builtin.h"
#include "util/util.h"
#include "util/parse-options.h"
#include "util/parse-events.h"
@@ -108,7 +109,7 @@
}
}
-int do_perfstat(int argc, const char **argv)
+static int do_perfstat(int argc, const char **argv)
{
unsigned long long t0, t1;
int counter;