summaryrefslogtreecommitdiffstats
path: root/opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'opt.c')
-rw-r--r--opt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/opt.c b/opt.c
index 14996f2..65520dd 100644
--- a/opt.c
+++ b/opt.c
@@ -1000,10 +1000,6 @@ int optimize_cmdline(struct cmdline *cmdline) {
return -1;
}
- if (cmdline->exclude->always_true) {
- bfs_warning(cmdline, "${red}-exclude${rs} applies to all files.\n");
- }
-
// Only non-excluded files are evaluated
state.facts = state.facts_when_false;
@@ -1018,6 +1014,10 @@ int optimize_cmdline(struct cmdline *cmdline) {
cmdline->expr = ignore_result(&state, cmdline->expr);
+ if (facts_are_impossible(&facts_when_impure)) {
+ bfs_warning(cmdline, "This command won't do anything.\n");
+ }
+
const struct range *depth_when_impure = &facts_when_impure.ranges[DEPTH_RANGE];
long long mindepth = depth_when_impure->min;
long long maxdepth = depth_when_impure->max;