From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: fix waring in af_unix Date: Mon, 15 Oct 2018 22:16:02 -0700 (PDT) Message-ID: <20181015.221602.1800911512004774943.davem@davemloft.net> References: <1539340454-67970-1-git-send-email-kyeongdon.kim@lge.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ktkhai@virtuozzo.com, viro@zeniv.linux.org.uk, garsilva@embeddedor.com, jbaron@akamai.com, dvlasenk@redhat.com, xiyou.wangcong@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: kyeongdon.kim@lge.com Return-path: In-Reply-To: <1539340454-67970-1-git-send-email-kyeongdon.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Kyeongdon Kim Date: Fri, 12 Oct 2018 19:34:14 +0900 > This fixes the "'hash' may be used uninitialized in this function" > > net/unix/af_unix.c:1041:20: warning: 'hash' may be used uninitialized in this function [-Wmaybe-uninitialized] > addr->hash = hash ^ sk->sk_type; > ^ > > Signed-off-by: Kyeongdon Kim Please put the initialization at the start of unix_mkname() as a similar situation exists elsewhere in this file, and the compiler will eventually warn there too.