avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] vfprintf warnings


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] vfprintf warnings
Date: Mon, 11 Nov 2002 16:09:12 +0100
User-agent: Mutt/1.2.5i

As E. Weddington wrote:

> Since I've been giving it a shot at building avrlibc with the latest 
> snapshots, I've noticed that there are 4 warnings for vfprintf.c 
> stating that 4 variables are possibly uninitialized before use: base, 
> pb, width, and prec.

That's OK.

There's no way to tell gcc to shut up about them.  Forcibly
initializing the variables would only cause a waste of code, since
from the program flow, it's certain that they are initialized before
being used (but gcc can't track this).  Three of these variables are
initialized as soon as a `%' sign has been found, the fourth (pb) is
initialized when it's actually going to be needed.  There's a need to
reinitialize these variables throughout the lifetime of the function
(as new formats from the format string are being parsed), that's why
there's no use to initialize them at function entry.

One of my current AVR projects causes a lot more of them. :-)

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]