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: <20160617082638.GB1406@tetsubishi>
Date:	Fri, 17 Jun 2016 10:26:38 +0200
From:	Wolfram Sang <wsa@...-dreams.de>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Wolfram Sang <wsa+renesas@...g-engineering.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: ks7010: honor 'const' qualifier

On Wed, Jun 15, 2016 at 11:53:11PM +0200, Arnd Bergmann wrote:
> The recently-added ks7010 driver produces an annoying build warning:
> 
> drivers/staging/ks7010/ks7010_config.c: In function 'ks_wlan_read_config_file':
> drivers/staging/ks7010/ks7010_config.c:263:8: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> 
> The problem here is that it assigns the firmware data to a non-const
> variable, and then goes on to modify it, which is clearly not the intended
> use case.
> 
> The only modification is to set the last byte to '\0', and as far as
> I can tell, this modification is unnecessary, as the parser always compares
> against the end pointer, rather than relying on zero-termination.
> 
> This patch therefore removes the modification of the const data and marks
> all the pointers 'const to avoid the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks! I'll send in a second a patch, though, which removes the config
file handling completely.

   Wolfram


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ