This commit is contained in:
Akim Demaille
2019-01-14 08:52:34 +01:00
parent 7c63cc1f6b
commit 8575bd06ae
2 changed files with 9 additions and 2 deletions

View File

@@ -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. */

View File

@@ -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)