Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp25868ybl; Tue, 7 Jan 2020 13:22:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwrOpW6Ep+m2YNZwuPfGnP0Ix69EZGnEy8njI+n7l0kCsbVG33OEdQHcdHJn0Llpip4HTni X-Received: by 2002:a9d:5c8a:: with SMTP id a10mr1618233oti.95.1578432162441; Tue, 07 Jan 2020 13:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578432162; cv=none; d=google.com; s=arc-20160816; b=b/V3+yEVi0yIffoMz3sQqa0LRsHnN2wxcqi0Ew4IfFPTfBQvnKZH+42/9N6RDS2sHh NbfeUJtzuilxWDeO1uEHHOcE+tF0r4Otnx69gwon9L+Hc0uzS3H2BGgpSxztvrFjFq4S fST7WIwHugKw8vdQ4FfkMvqo1mVaZSofxtwZ5BeO8eGM4MyzzncGpmm2aLgDdJZzkuq9 2i+K3Tt8eepk1cTtVwnRXaGgZYHjw7ssysKKsENt0pWsI2pk5F9AYYkx927Jx33KBr8g P79d4U5MrI1mK1NP4UG32L0QvIDSSCeHBaTtmqU9d+g3reu1xEnP9Wl4rlL0Jv0cCvEQ T0VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Rw4jFiN+43R8WlBucxoRiILo8GL5XhW5GOTs0gBv4mg=; b=GsFNmaWQkq9E5l5QpWaVYQqZapE/sRX8JsIHdpIzygejF0YWAPXWUKzCzIeKu6bnpI EqnFg99Gh1IIx2VDl8V+nUaVFGuxxl0TdVHWrduULuJ8bbLBFRwBbMVemYOZDWEGwsV1 j5qSUgxRjMPUcSrB9j1NQD2H+tBlARcLX4IYnxOvidE6BYlOjZbdd+//NaTlHAdQiFDm q9rOo/I/i8UGzVU9z+MBrtg7Pu9vULmaoHVl8mj8aVQeEv+W87gY03y3XlRVnbV4voya sTT66uREfsw5o6FO04TpmQix44wLejU7Yo9yAkVzKxEXO8QLCCSoNqrMiIspr0Re9DKP MIrA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si655049oia.169.2020.01.07.13.22.30; Tue, 07 Jan 2020 13:22:42 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbgAGVDM (ORCPT + 99 others); Tue, 7 Jan 2020 16:03:12 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:33875 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbgAGVDI (ORCPT ); Tue, 7 Jan 2020 16:03:08 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MK3eI-1j87qh1y5m-00LZCF; Tue, 07 Jan 2020 22:02:57 +0100 From: Arnd Bergmann To: Ilya Dryomov , Sage Weil , Jens Axboe Cc: Oleksandr Natalenko , Arnd Bergmann , Dongsheng Yang , Jason Dillaman , David Howells , ceph-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rbd: work around -Wuninitialized warning Date: Tue, 7 Jan 2020 22:01:04 +0100 Message-Id: <20200107210256.2426176-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: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3QLrQ5Hy5LO+9T3xqOF +rOFy+C8Yi7a1h56k44qj5gbp1eBFwMVG33nWa6NciNxm3PYswLJ/eCpea1WdD6UkN76PQn2e LkkHj/b+AE4EjXP1YI5g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc -O3 warns about a dummy variable that is passed down into rbd_img_fill_nodata without being initialized: drivers/block/rbd.c: In function 'rbd_img_fill_nodata': drivers/block/rbd.c:2573:13: error: 'dummy' is used uninitialized in this function [-Werror=uninitialized] fctx->iter = *fctx->pos; Since this is a dummy, I assume the warning is harmless, but it's better to initialize it anyway and avoid the warning. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 29be02838b67..070edc5983df 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2664,7 +2664,7 @@ static int rbd_img_fill_nodata(struct rbd_img_request *img_req, u64 off, u64 len) { struct ceph_file_extent ex = { off, len }; - union rbd_img_fill_iter dummy; + union rbd_img_fill_iter dummy = {}; struct rbd_img_fill_ctx fctx = { .pos_type = OBJ_REQUEST_NODATA, .pos = &dummy, -- 2.20.0