* [patch] ufs: silence uninitialized warnings
@ 2016-03-22 11:40 Dan Carpenter
2016-03-22 13:41 ` Evgeniy Dushistov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-03-22 11:40 UTC (permalink / raw)
To: Evgeniy Dushistov; +Cc: linux-kernel, kernel-janitors
Static checkers complain that we can use "tmp" without initializing it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] ufs: silence uninitialized warnings
2016-03-22 11:40 [patch] ufs: silence uninitialized warnings Dan Carpenter
@ 2016-03-22 13:41 ` Evgeniy Dushistov
0 siblings, 0 replies; 2+ messages in thread
From: Evgeniy Dushistov @ 2016-03-22 13:41 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-kernel, kernel-janitors
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@oracle.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-22 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-22 11:40 [patch] ufs: silence uninitialized warnings Dan Carpenter
2016-03-22 13:41 ` Evgeniy Dushistov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox