From: Wang Weidong <wangweidong1@huawei•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Miller <davem@davemloft•net>, <edumazet@google•com>,
<ebiederm@xmission•com>, <gaofeng@cn•fujitsu.com>,
<jacob.e.keller@intel•com>, <netdev@vger•kernel.org>
Subject: Re: [PATCH] unix: fix build warning of used uninitialized variable
Date: Fri, 6 Dec 2013 14:38:33 +0800 [thread overview]
Message-ID: <52A170E9.9020801@huawei.com> (raw)
In-Reply-To: <1386311079.30495.236.camel@edumazet-glaptop2.roam.corp.google.com>
On 2013/12/6 14:24, Eric Dumazet wrote:
> On Fri, 2013-12-06 at 14:05 +0800, Wang Weidong wrote:
>> af_unix.c: In function unix_bind
>> af_unix.c:893: warning: path may be used uninitialized in this function
>>
>> Signed-off-by: Wang Weidong <wangweidong1@huawei•com>
>> ---
>> net/unix/af_unix.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>> index 01625cc..4155ed3 100644
>> --- a/net/unix/af_unix.c
>> +++ b/net/unix/af_unix.c
>> @@ -893,6 +893,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
>> struct path path;
>> umode_t mode = S_IFSOCK |
>> (SOCK_INODE(sock)->i_mode & ~current_umask());
>> + memset(&path, 0, sizeof(path));
>> err = unix_mknod(sun_path, mode, &path);
>> if (err) {
>> if (err == -EEXIST)
>
> You should update your compiler, this patch is not needed.
>
>
Ok.
Thanks!
>
>
>
prev parent reply other threads:[~2013-12-06 6:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 6:05 [PATCH] unix: fix build warning of used uninitialized variable Wang Weidong
2013-12-06 6:24 ` Eric Dumazet
2013-12-06 6:38 ` Wang Weidong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A170E9.9020801@huawei.com \
--to=wangweidong1@huawei$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=ebiederm@xmission$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=gaofeng@cn$(echo .)fujitsu.com \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox