From 7c5e508b3984cbebdc7b5abf741410a5e5c6051c Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 14 Jan 2019 20:02:05 +0100 Subject: [PATCH] Revert the last two commits They should not have been pushed, sorry about that. This reverts - commit 8575bd06ae6e65f3a30b21a3e022a968e4c7ae7a. - commit 55bf52860eac5c1394dc344a691220272df32b09. --- configure.ac | 2 +- src/fixits.c | 8 -------- src/main.c | 3 ++- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 4fb7e831..e60af602 100644 --- a/configure.ac +++ b/configure.ac @@ -95,7 +95,7 @@ AC_ARG_ENABLE([gcc-warnings], AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes]) if test "$enable_gcc_warnings" = yes; then warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align - -fparse-all-comments -Wdocumentation -Wextra-semi + -fparse-all-comments -Wdocumentation -Wformat -Wnull-dereference -Wpointer-arith -Wshadow -Wwrite-strings' warn_c='-Wbad-function-cast -Wstrict-prototypes' warn_cxx='-Wextra-semi -Wnoexcept' diff --git a/src/fixits.c b/src/fixits.c index 25353216..769b8508 100644 --- a/src/fixits.c +++ b/src/fixits.c @@ -33,7 +33,6 @@ #include "quotearg.h" #include "vasnprintf.h" -#include "complain.h" #include "files.h" typedef struct @@ -98,13 +97,6 @@ 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 76ffcdef..94782573 100644 --- a/src/main.c +++ b/src/main.c @@ -105,7 +105,8 @@ main (int argc, char *argv[]) /* Fix input file now, even if there are errors: that's less warnings in the following runs. */ - fixits_run (); + if (update_flag) + fixits_run (); fixits_free (); if (complaint_status == status_complaint)