summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorfche <fche>2007-10-06 02:42:29 +0000
committerfche <fche>2007-10-06 02:42:29 +0000
commita9e8f7e0533811be2cd7c9a88d9058da8caa1d11 (patch)
tree1bf932760ff25506f7fb8c9c2fc118bb249f5113 /main.cxx
parent9ac6c5a8273dd7133a79517c9cd47b1a66b51c24 (diff)
downloadsystemtap-steved-a9e8f7e0533811be2cd7c9a88d9058da8caa1d11.tar.gz
systemtap-steved-a9e8f7e0533811be2cd7c9a88d9058da8caa1d11.tar.xz
systemtap-steved-a9e8f7e0533811be2cd7c9a88d9058da8caa1d11.zip
PR1119: unused variable elision warnings
2007-10-05 Frank Ch. Eigler <fche@elastic.org> PR 1119 * elaborate.cxx (semantic_pass_opt[12]): Warn on elided variables/functions in user script. * session.h (suppress_warnings): New field. Change "timing" to plain old bool. * main.cxx (main): Configure warnings on by default. * stap.1.in: Document this. PR 1119. * systemtap.base/warnings.*: New test. * futexes.stp, sig_by_proc.stp, small_demos/rwtiming.stp: Fix elision warnings.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/main.cxx b/main.cxx
index 09435fad..7d4b8133 100644
--- a/main.cxx
+++ b/main.cxx
@@ -71,6 +71,7 @@ usage (systemtap_session& s, int exitcode)
<< " -V show version" << endl
<< " -k keep temporary directory" << endl
<< " -u unoptimized translation" << (s.unoptimized ? " [set]" : "") << endl
+ << " -w suppress warnings" << (s.suppress_warnings ? " [set]" : "") << endl
<< " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl
<< " -P prologue-searching for function probes"
<< (s.prologue_searching ? " [set]" : "") << endl
@@ -200,10 +201,11 @@ main (int argc, char * const argv [])
s.kernel_release = string (buf.release);
s.architecture = string (buf.machine);
s.verbose = 0;
- s.timing = 0;
+ s.timing = false;
s.guru_mode = false;
s.bulk_mode = false;
s.unoptimized = false;
+ s.suppress_warnings = false;
#ifdef ENABLE_PROLOGUES
s.prologue_searching = true;
@@ -273,8 +275,8 @@ main (int argc, char * const argv [])
while (true)
{
- // NB: also see find_hash(), help(), switch stmt below, stap.1 man page
- int grc = getopt (argc, argv, "hVMvtp:I:e:o:R:r:m:kgPc:x:D:bs:uq");
+ // NB: also see find_hash(), usage(), switch stmt below, stap.1 man page
+ int grc = getopt (argc, argv, "hVMvtp:I:e:o:R:r:m:kgPc:x:D:bs:uqw");
if (grc < 0)
break;
switch (grc)
@@ -292,7 +294,11 @@ main (int argc, char * const argv [])
break;
case 't':
- s.timing ++;
+ s.timing = true;
+ break;
+
+ case 'w':
+ s.suppress_warnings = true;
break;
case 'p':