lkml.org 
[lkml]   [1999]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix compilation warnings in dquot.c of 2.2.14pre8


On Thu, 25 Nov 1999, Alexander Viro wrote:

> On Thu, 25 Nov 1999, Daniel Roesen wrote:
>
> > Hi!
> >
> > Just a cleanup patch. Fixes two warnings when compiling dquot.c in 2.2.14pre8.
> [snip]
> > @@ -539,7 +539,7 @@
> > struct dquot *get_empty_dquot(void)
> > {
> > struct dquot *dquot;
> > - int count;
> > + int count=0;
>
> Hmm... I have a bad feeling about that. I don't have the thing at hands
> (didn't follow 2.2 for a while), but 99 times of 100 "stupid gcc
> complaining about uninitialized variables" actually has a good reason for
> such complaints. IOW, such change is _not_ a trivial cleanup. It may be
> correct fix, but it may be turning random bug into deterministic one _and_
> removing a hint that something may be amiss here.

Ouch. Yes, it is safe, but by pure accident. Correct fix: either remove
count at all (toss printk() and do free_inode_memory(0)) or replace
prune_dcache(... with count=prune_dcache(...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.059 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site