diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-25 09:25:41 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-25 09:25:41 +0200 |
commit | c0e9f73728d1c38ebce5fdd45df508fff26e26c4 (patch) | |
tree | 06539ef93852af2efa547675985c7a4e35e44957 /main.c | |
parent | 44611db36ba329fab248179e0350d44fcff5e3c2 (diff) | |
download | egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.gz egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.bz2 egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.zip |
Small profiling improvements.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -331,6 +331,7 @@ main(int argc, char **argv) _("environment variable `POSIXLY_CORRECT' set: turning on `--posix'")); } + // Checks for conflicting command-line arguments. if (do_posix) { use_lc_numeric = true; if (do_traditional) /* both on command line */ @@ -348,9 +349,6 @@ main(int argc, char **argv) warning(_("`--posix'/`--traditional' overrides `--non-decimal-data'")); } - if (do_lint && os_is_setuid()) - warning(_("running %s setuid root may be a security problem"), myname); - if (do_binary) { if (do_posix) warning(_("`--posix' overrides `--characters-as-bytes'")); @@ -361,6 +359,9 @@ main(int argc, char **argv) #endif } + if (do_lint && os_is_setuid()) + warning(_("running %s setuid root may be a security problem"), myname); + if (do_debug) /* Need to register the debugger pre-exec hook before any other */ init_debug(); @@ -1626,9 +1627,13 @@ parse_args(int argc, char **argv) break; case 'p': + if (do_pretty_print) + warning(_("`--profile' overrides `--pretty-print'")); do_flags |= DO_PROFILE; /* fall through */ case 'o': + if (c == 'o' && do_profile) + warning(_("`--profile' overrides `--pretty-print'")); do_flags |= DO_PRETTY_PRINT; if (optarg != NULL) set_prof_file(optarg); |