diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2010-02-25 21:14:52 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2010-02-25 21:14:52 -0500 |
commit | 57a56e00067b4546bb0da15fb00653ee0341f5af (patch) | |
tree | 980fb3e65e34b96e298261363139db00820e4c14 /main.cxx | |
parent | 780f11fff7829a952ded0308f5ee47c65bbfc1c0 (diff) | |
download | systemtap-steved-57a56e00067b4546bb0da15fb00653ee0341f5af.tar.gz systemtap-steved-57a56e00067b4546bb0da15fb00653ee0341f5af.tar.xz systemtap-steved-57a56e00067b4546bb0da15fb00653ee0341f5af.zip |
PR11075: -W option to turn warnings into errors
* session.h
* NEWS: Discuss it.
* main.cxx: Parse it.
* session.h (num_errors): Provide it.
* semok/fortyeight.stp, semok/thirtyseven.stp: Test it.
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -93,6 +93,7 @@ usage (systemtap_session& s, int exitcode) << " -k keep temporary directory" << endl << " -u unoptimized translation" << (s.unoptimized ? " [set]" : "") << endl << " -w suppress warnings" << (s.suppress_warnings ? " [set]" : "") << endl + << " -W turn warnings into errors" << (s.panic_warnings ? " [set]" : "") << endl << " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl << " -P prologue-searching for function probes" << (s.prologue_searching ? " [set]" : "") << endl @@ -504,6 +505,7 @@ main (int argc, char * const argv []) s.bulk_mode = false; s.unoptimized = false; s.suppress_warnings = false; + s.panic_warnings = false; s.listing_mode = false; s.listing_mode_vars = false; @@ -640,7 +642,7 @@ main (int argc, char * const argv []) { "help", 0, &long_opt, LONG_OPT_HELP }, { NULL, 0, NULL, 0 } }; - int grc = getopt_long (argc, argv, "hVvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:", + int grc = getopt_long (argc, argv, "hVvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:W", long_options, NULL); if (grc < 0) break; @@ -663,6 +665,10 @@ main (int argc, char * const argv []) s.suppress_warnings = true; break; + case 'W': + s.panic_warnings = true; + break; + case 'p': s.last_pass = (int)strtoul(optarg, &num_endptr, 10); if (*num_endptr != '\0' || s.last_pass < 1 || s.last_pass > 5) |