On Wed, 25 May 2016, Bjoern Voigt wrote:
Is the GCC 6 option -Werror=misleading-indentation really helpful?
I saw this patch for Mozilla NSS: https://build.opensuse.org/package/view_file/mozilla:Factory/mozilla-nss/nss...
The patch is long, but mostly changes indentation to make GCC 6 with -Werror=misleading-indentation happy.
One example: --- nss.orig/lib/dbm/src/hash.c +++ nss/lib/dbm/src/hash.c @@ -154,7 +154,7 @@ __hash_open(const char *file, int flags, return NULL; } hashp->fp = NO_FILE; - if(file) + if (file) hashp->filename = strdup(file);
/*
I believe this must be a spurious formatting change not required to
fix any -Wmisleading-indentation warning.
Richard.
--
Richard Biener