Re: [PATCH 0/7] pull: make smatch scan output easy to digest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

I tried to look docs if attribute position really has some special meaning,
but could not find anything. Before digging deeper with this perhaps
someone on the list can tell what is going on with this warning.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
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



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux