Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3805470img; Mon, 25 Mar 2019 19:01:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFmxdaPNizLkCZuhPU9glq1xmLifL9t4KTLtB4lQ2WqstiGkQf4ipHqlLNN/xBk2FbrhDw X-Received: by 2002:a63:2c87:: with SMTP id s129mr26175391pgs.311.1553565687736; Mon, 25 Mar 2019 19:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553565687; cv=none; d=google.com; s=arc-20160816; b=QEf1kMJXBOhaut1MUyVJCaaxQrNh/7mIZDRisgjlTShiKZCWYi0Ja70aUpN6UkzkQQ Y8CIckup2FZ2i4uAL1Q1TAgTt12F773sKgGXpgIXeWoOEvo4ZCbt4xy4tohDt2+ipJ9/ Su0yQHoL3EB+ZyXSV4WasakzNaJiOUAYKoZCZ6QxZqsxihLPrqNT1wtUuMK31ohokajM ZRtfDp0S626rtEe2o3DBjLbd4mhn4pRe6U5XYlW9s5Bc962lHsKqKxBQlIEThPv0EKGR Kt1DufZURde4qohE1ZpRsrhuy52sdPkMcXhdmDOHmcL2YHbh4pHQmpHh2fLBLLNncp72 MjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:to:from:date :dkim-signature; bh=t+qMmHzBR4DjmBcN69RFLD3h2J4om3ztagHlBsYe6Kk=; b=qbErmTE3agZ4Pa9P2Ii8VDhWDmMkc0mq50RHNtfR75I+I+EiJH6Lx9OLvt9sGsy4Df Qm+PxtISRRfjjXE/C+vYQofZBTnBoxaPLvRz+RuBpnzJGDtaTNPZYtOIYik5IRC2QV2T 5vioo59sjEnBYbta92BEOITyTWrWciijpOVxbFLltmXyAihK4JbMB1ywcE97TihpvHll XSz2t0ZDDauBdnKbKny8/444+ExhGZDu49GJJ2ZPIDFBptsXdkMSYvVnxDYZsLP9XqO8 ltgu8Gg9z+sgUmKnZoANSfTFIsbFoNL/uGTSuu6OEZqTv6KOoWzD/ZAoGX6sJAR6mKjn Re6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DHSWLj0O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si7987194plo.216.2019.03.25.19.01.12; Mon, 25 Mar 2019 19:01:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DHSWLj0O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730877AbfCZCAF (ORCPT + 99 others); Mon, 25 Mar 2019 22:00:05 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36093 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbfCZCAF (ORCPT ); Mon, 25 Mar 2019 22:00:05 -0400 Received: by mail-pg1-f194.google.com with SMTP id r124so7479198pgr.3; Mon, 25 Mar 2019 19:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=t+qMmHzBR4DjmBcN69RFLD3h2J4om3ztagHlBsYe6Kk=; b=DHSWLj0OnWP2FrggkOf4UJYd9aUo8fBQlQvAJiuM6p4Yq1fEjursjHf0pf1lJBlEBX Zg8OOxe4RDOhIBEfGh4xzoOLczntBv3doDbLKtEDO/1h3GV5B4GQQrnTYmtAIYJdtjzV 7Q4Hpq5xC7jRvc+6reNZv+Co3hgLAhldr6gsCyqye1a+wHeJVpKXRpgwNmue9mW32eTD FYVBdzeZ+5ffCgKnYYJv04Oq4q/sOlv9BOSG+I+iyD1YLSwTtGiS48YhG0Z7td6FYne5 C1uX4wa+iWZAiyq4lofI/ULcqQNp3yN4ElgTEakcCIcPkXj7fwE6LaNiMwiKOdzdG4ct pogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=t+qMmHzBR4DjmBcN69RFLD3h2J4om3ztagHlBsYe6Kk=; b=onS+0zdU5kCsj66gzLLXgDR0RQOB4FkpciOlVaYV62gHnzDlUUw6NVezYA+Qne52x3 2+BVWqZKVbCS8/9QMRK+zOqxof50rgZ+urJv9LAvItOhcUvdZJ7THgfhGQjBQDab9zW9 4EUglJLTXYhJAJ5yeQid5Bnjk4T6WZ/Zic45qU43ewGECDIs86Gbb7276Y1hJsN125+l 50+K5NYGkmmW5B6jR7krYwLO2eHB6W04i9+h/QsmEyXnPJhq4FKKmaRzN8TrFts03G5p shZNUuAHyiRG9spoOIkY8oTQqbduRM8jFiEBnkWwhLw/oCWye0qFRmaKPffa0vBDecEv FUvA== X-Gm-Message-State: APjAAAXSf4D/wZQAI9ne7yWLBciA9Tj0cDpDIfYQmL1k2H9h3hF4oXCR NytmV5kghNSWLGYHuf0X5R0= X-Received: by 2002:a65:6299:: with SMTP id f25mr26843229pgv.376.1553565604263; Mon, 25 Mar 2019 19:00:04 -0700 (PDT) Received: from ip-172-31-25-235.us-west-2.compute.internal (ec2-54-245-141-36.us-west-2.compute.amazonaws.com. [54.245.141.36]) by smtp.gmail.com with ESMTPSA id 17sm23841230pgt.0.2019.03.25.19.00.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 19:00:03 -0700 (PDT) Date: Tue, 26 Mar 2019 02:00:01 +0000 From: Alakesh Haloi To: Trond Myklebust , Anna Schumaker , "J. Bruce Fields" , Jeff Layton , "David S. Miller" , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: [PATCH] SUNRPC: fix uninitialized variable warning Message-ID: <20190326020001.GA29659@ip-172-31-25-235.us-west-2.compute.internal> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid following compiler warning on uninitialized variable net/sunrpc/xprtsock.c: In function ‘xs_read_stream_request.constprop’: net/sunrpc/xprtsock.c:525:10: warning: ‘read’ may be used uninitialized in this function [-Wmaybe-uninitialized] return read; ^~~~ net/sunrpc/xprtsock.c:529:23: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] return ret < 0 ? ret : read; ~~~~~~~~~~~~~~^~~~~~ Signed-off-by: Alakesh Haloi --- net/sunrpc/xprtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9359539907ba..732d4b57411a 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -495,8 +495,8 @@ xs_read_stream_request(struct sock_xprt *transport, struct msghdr *msg, int flags, struct rpc_rqst *req) { struct xdr_buf *buf = &req->rq_private_buf; - size_t want, read; - ssize_t ret; + size_t want, uninitialized_var(read); + ssize_t uninitialized_var(ret); xs_read_header(transport, buf); -- 2.17.2