confuse-devel
[Top][All Lists]
Advanced

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

Re: [Confuse-devel] Re: [PATCH 1/7] confuse: ISO C90 does not support th


From: Carlo Marcelo Arenas Belon
Subject: Re: [Confuse-devel] Re: [PATCH 1/7] confuse: ISO C90 does not support the ???%lf??? printf format
Date: Mon, 12 Jul 2010 08:09:19 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jul 12, 2010 at 09:13:15AM +0200, Martin Hedenfalk wrote:
> 12 jul 2010 kl. 08.40 skrev Carlo Marcelo Arenas Belon:
> > 
> >> diff --git a/src/confuse.c b/src/confuse.c
> >> index 003d0b9..6e7a0ef 100644
> >> --- a/src/confuse.c
> >> +++ b/src/confuse.c
> >> @@ -1407,7 +1407,7 @@ DLLIMPORT void cfg_opt_nprint_var(cfg_opt_t *opt, 
> >> unsigned int index, FILE *fp)
> >>             fprintf(fp, "%ld", cfg_opt_getnint(opt, index));
> >>             break;
> >>         case CFGT_FLOAT:
> >> -            fprintf(fp, "%lf", cfg_opt_getnfloat(opt, index));
> >> +            fprintf(fp, "%f", cfg_opt_getnfloat(opt, index));
> >>             break;
> >>         case CFGT_STR:
> >>             str = cfg_opt_getnstr(opt, index);
> >> -- 
> > 
> > this snippet should prevent that, but wasn't committed as part of this patch
> > in 6d5335a8ac0ea6bdb553931a29bef0e2d21d4e3e
> > 
> > anyone has any objections or is depending on the undefined behaviour that
> > "%lf" has?
> 
> We don't want any undefined behaviour. Ok.

commited in 042c6ee61019042d0948cd9b5a740e279a32d456

Carlo



reply via email to

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