On Mon, Feb 20, 2017 at 10:12:06PM +0000, Sami Kerola wrote: > On 20 February 2017 at 12:14, Karel Zak <kzak@xxxxxxxxxx> wrote: > > Merged, but except: > > > > On Mon, Feb 13, 2017 at 10:06:34PM +0000, Sami Kerola wrote: > >> misc: unify function declarations [smatch scan] > > > > I agree that some unification would be nice, but don't like > > > > static __attribute__((__noreturn__)) __attribute__((__format__(printf, 1, 2))) > > void log_err(const char *fmt, ...); > > > > it would be better to keep all the attributes after declaration: > > > > static void log_err(const char *fmt, ...) > > __attribute__((__noreturn__)) > > __attribute__((__format__(printf, 1, 2))); > > > > it means new line for each attribute. IMHO it's more readable and you > > don't have to search for the function name, etc. > > Hi Karel, > > That's fair enough, and truth is the patch did not fix many warnings so > I am sure we can live with them. > > What comes to moving attributes at end of the declaration that does > not please smatch. > > lib/exec_shell.c:33:1: error: attributes should be specified before > the declarator in a function definition > void exec_shell(void) Report it as smatch bug. It's pretty common that function attributes are defined after declaration. CC: Dan. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html