public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Poyo VL <poyo_vl@yahoo.com>
To: aelder@sgi.com
Cc: xfs@oss.sgi.com
Subject: Patch fs/xfs/xfs_alloc.c
Date: Wed, 1 Sep 2010 12:27:39 -0700 (PDT)	[thread overview]
Message-ID: <356042.32153.qm@web45810.mail.sp1.yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

File: fs/xfs/xfs_alloc.c
Kernel: 2.6.35.4

It is not an important patch, but I got some warnings:

fs/xfs/xfs_alloc.c: In function ‘xfs_alloc_ag_vextent_near’:
fs/xfs/xfs_alloc.c:694:15: warning: ‘ltlena’ may be used uninitialized in this 
function
fs/xfs/xfs_alloc.c:683:15: warning: ‘gtlena’ may be used uninitialized in this 
function

And I hate warnings.

So I initialized that structures with 0. I attached the "patch".

Sorry, I am not a C or a kernel expert. But I try do something usefull :)

I am sorry If I did something wrong and thanks for your time.

Ionut Gabriel Popescu



      

[-- Attachment #2: patch.diff --]
[-- Type: application/octet-stream, Size: 905 bytes --]

--- xfs_alloc.c	2010-09-01 22:00:50.044004253 +0300
+++ xfs_alloc_2.c	2010-09-01 22:01:32.400007466 +0300
@@ -680,7 +680,7 @@
 	xfs_agblock_t	gtbnoa;		/* aligned ... */
 	xfs_extlen_t	gtdiff;		/* difference to right side entry */
 	xfs_extlen_t	gtlen;		/* length of right side entry */
-	xfs_extlen_t	gtlena;		/* aligned ... */
+	xfs_extlen_t	gtlena = {0};		/* aligned ... */
 	xfs_agblock_t	gtnew;		/* useful start bno of right side */
 	int		error;		/* error code */
 	int		i;		/* result code, temporary */
@@ -691,7 +691,7 @@
 	/*REFERENCED*/
 	xfs_agblock_t	ltend;		/* end bno of left side entry */
 	xfs_extlen_t	ltlen;		/* length of left side entry */
-	xfs_extlen_t	ltlena;		/* aligned ... */
+	xfs_extlen_t	ltlena = {0};		/* aligned ... */
 	xfs_agblock_t	ltnew;		/* useful start bno of left side */
 	xfs_extlen_t	rlen;		/* length of returned extent */
 #if defined(DEBUG) && defined(__KERNEL__)

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2010-09-01 19:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 19:27 Poyo VL [this message]
2010-09-02  5:21 ` Patch fs/xfs/xfs_alloc.c Dave Chinner
2010-09-02  7:41   ` Poyo VL
2010-09-16 15:38     ` Alex Elder

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=356042.32153.qm@web45810.mail.sp1.yahoo.com \
    --to=poyo_vl@yahoo.com \
    --cc=aelder@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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