From mboxrd@z Thu Jan 1 00:00:00 1970 From: pramod.gurav.etc@gmail.com Subject: [PATCH] fs/direct-io.c: Fix compilation warning for uninitialized variables Date: Fri, 4 Jul 2014 11:13:52 +0530 Message-ID: <1404452632-10912-1-git-send-email-pramod.gurav.etc@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Pramod Gurav , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: unlisted-recipients:; (no To-header on input) Return-path: Received: from mail-pa0-f45.google.com ([209.85.220.45]:53644 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbaGDFkF (ORCPT ); Fri, 4 Jul 2014 01:40:05 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: =46rom: Pramod Gurav =46ixes below warning while compiling the kernel. fs/direct-io.c: In function =E2=80=98__blockdev_direct_IO=E2=80=99: fs/direct-io.c:1011:12: warning: =E2=80=98to=E2=80=99 may be used unini= tialized in this function [-Wmaybe-uninitialized] fs/direct-io.c:913:16: note: =E2=80=98to=E2=80=99 was declared here fs/direct-io.c:1011:12: warning: =E2=80=98from=E2=80=99 may be used uni= nitialized in this function [-Wmaybe-uninitialized] fs/direct-io.c:913:10: note: =E2=80=98from=E2=80=99 was declared here Signed-off-by: Pramod Gurav CC: Alexander Viro CC: linux-fsdevel@vger.kernel.org CC: linux-kernel@vger.kernel.org --- fs/direct-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 98040ba..6ad5d2c 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -910,7 +910,7 @@ static int do_direct_IO(struct dio *dio, struct dio= _submit *sdio, =20 while (sdio->block_in_file < sdio->final_block_in_request) { struct page *page; - size_t from, to; + size_t from =3D 0, to =3D 0; page =3D dio_get_page(dio, sdio, &from, &to); if (IS_ERR(page)) { ret =3D PTR_ERR(page); --=20 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html