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, 22 Mar 2016 16:41:09 +0300
From:	Evgeniy Dushistov <dushistov@...l.ru>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] ufs: silence uninitialized warnings

On Tue, Mar 22, 2016 at 02:40:02PM +0300, Dan Carpenter wrote:
> Static checkers complain that we can use "tmp" without initializing it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/fs/ufs/util.h b/fs/ufs/util.h
> index 9541759..8aa8812 100644
> --- a/fs/ufs/util.h
> +++ b/fs/ufs/util.h
> @@ -88,7 +88,7 @@ ufs_get_fs_npsect(struct super_block *sb, struct ufs_super_block_first *usb1,
>  static inline u64
>  ufs_get_fs_qbmask(struct super_block *sb, struct ufs_super_block_third *usb3)
>  {
> -	__fs64 tmp;
> +	__fs64 tmp = 0;
>  
>  	switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) {
>  	case UFS_ST_SUNOS:
> @@ -112,7 +112,7 @@ ufs_get_fs_qbmask(struct super_block *sb, struct ufs_super_block_third *usb3)
>  static inline u64
>  ufs_get_fs_qfmask(struct super_block *sb, struct ufs_super_block_third *usb3)
>  {
> -	__fs64 tmp;
> +	__fs64 tmp = 0;
>  
>  	switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) {
>  	case UFS_ST_SUNOS:

In fact result of this function is saved, but not used.
May be better from cleanup point of view will be remove these two
functions and structure fields where their result was saved.

-- 
/Evgeniy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ