From 8575bd06ae6e65f3a30b21a3e022a968e4c7ae7a Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 14 Jan 2019 08:52:34 +0100 Subject: [PATCH] WIP --- src/fixits.c | 8 ++++++++ src/main.c | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/fixits.c b/src/fixits.c index 769b8508..25353216 100644 --- a/src/fixits.c +++ b/src/fixits.c @@ -33,6 +33,7 @@ #include "quotearg.h" #include "vasnprintf.h" +#include "complain.h" #include "files.h" typedef struct @@ -97,6 +98,13 @@ fixits_run (void) if (!fixits) return; + if (!update_flag) + { + complain (NULL, Wother, + _("some fixes can be applied. Rerun with option '--update'.")); + return; + } + /* This is not unlike what is done in location_caret. */ uniqstr input = ((fixit *) gl_list_get_at (fixits, 0))->location.start.file; /* Backup the file. */ diff --git a/src/main.c b/src/main.c index 94782573..76ffcdef 100644 --- a/src/main.c +++ b/src/main.c @@ -105,8 +105,7 @@ main (int argc, char *argv[]) /* Fix input file now, even if there are errors: that's less warnings in the following runs. */ - if (update_flag) - fixits_run (); + fixits_run (); fixits_free (); if (complaint_status == status_complaint)