lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Oct 2017 01:54:42 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jiang Biao <jiang.biao2@....com.cn>, apw@...onical.com
Cc:     linux-kernel@...r.kernel.org, zhong.weidong@....com.cn
Subject: Re: [PATCH] scripts/checkpatch.pl: fix false warning of externs
 checking.

On Tue, 2017-10-10 at 16:42 +0800, Jiang Biao wrote:
> When adding a function declaration in a .c file without an extern
> keywork decoration, checkpatch.pl will complain *externs should be
> avoided in .c files* false warning. This patch fix the bug.

nack.

The point is that external function declarations should be
done via #include.

> Signed-off-by: Jiang Biao <jiang.biao2@....com.cn>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index dd2c262..170daf1 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -5927,7 +5927,7 @@ sub process {
>  
>  # check for new externs in .c files.
>  		if ($realfile =~ /\.c$/ && defined $stat &&
> -		    $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s)
> +		    $stat =~ /^.\s*(?:extern\s+)$Type\s+($Ident)(\s*)\(/s)
>  		{
>  			my $function_name = $1;
>  			my $paren_space = $2;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ