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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e8cb8e7-548f-4100-97a2-41576749fb63@infradead.org>
Date: Thu, 10 Oct 2024 20:13:59 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: André Almeida <andrealmeid@...lia.com>,
 Jonathan Corbet <corbet@....net>, Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 kernel-dev@...lia.com
Subject: Re: [PATCH] scripts/kernel-doc: Fix build time warnings



On 10/10/24 3:59 PM, André Almeida wrote:
> As stated at Documentation/kbuild/llvm.rst, to make usage of ccache one
> must set KBUILD_BUILD_TIMESTAMP=''. Setting this together with W=1
> will trigger the following warning for every compiled file:
> 
>   date: invalid date ‘+%s’
> 
> This comes from kernel-doc script, that produces the following command
> when KBUILD_BUILD_TIMESTAMP is empty:
> 
>   date -d"" +%s
> 
> That triggers the warning above. Add a space between the flag `-d` and
> the string argument to fix date command and remove the warning.
> 
> Signed-off-by: André Almeida <andrealmeid@...lia.com>

Acked-by: Randy Dunlap <rdunlap@...radead.org>

Thanks.

> ---
>  scripts/kernel-doc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 2791f8195203..8728f9824c65 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -160,7 +160,7 @@ my @export_file_list;
>  
>  my @build_time;
>  if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) &&
> -    (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
> +    (my $seconds = `date -d "${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
>      @build_time = gmtime($seconds);
>  } else {
>      @build_time = localtime;

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ