From c0e9f73728d1c38ebce5fdd45df508fff26e26c4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 25 Feb 2019 09:25:41 +0200 Subject: Small profiling improvements. --- main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'main.c') 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); -- cgit v1.2.3