aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-02-25 09:25:41 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-02-25 09:25:41 +0200
commitc0e9f73728d1c38ebce5fdd45df508fff26e26c4 (patch)
tree06539ef93852af2efa547675985c7a4e35e44957 /main.c
parent44611db36ba329fab248179e0350d44fcff5e3c2 (diff)
downloadegawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.gz
egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.bz2
egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.zip
Small profiling improvements.
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/main.c b/main.c
index 5800231c..b4ca5fdc 100644
--- a/main.c
+++ b/main.c
@@ -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);