httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Oops... missed this sscanf() warning
Date Mon, 20 Jan 1997 07:24:34 GMT
Ooops. Ignore this. I was thinking of printf not scanf. Should have had some
coffee first ;-)

Cheers,

Ben.

Ben Laurie wrote:
> 
> Jim Jagielski wrote:
> > 
> > Anybody else see this?:
> > 
> > mod_imap.c: In function `imap_handler':
> > mod_imap.c:689: warning: unknown conversion type character `.' in format
> > mod_imap.c:689: warning: unknown conversion type character `.' in format
> > mod_imap.c:689: warning: too many arguments for format
> > 
> > It's the %.200s
> > 
> > It should be %200s
> 
> Should it? The meanings are quite different. %.200s means "at most 200
> characters" and %200s means "at least 200 characters". And I don't know where
> your compiler is coming from with that warning. I quote SCO's man printf:
> 
>   .prec   An optional entry that consists of a period (.) that precedes either
>           zero or more decimal digits, or an asterisk (*), or an asterisk
>           followed by one or more decimal digits and a $. It specifies the
>           minimum number of digits to appear for the b, B, d, i, o, u, x, and
>           X conversions, the number of digits to appear after the
>           decimal-point character for the a, A, e, E, f, and F conversions,
>           the maximum number of significant digits for the g and G
>           conversions, or the maximum number of bytes to be written from a
>           string for an s and S conversions. If only a period is specified,
>           the precision is taken as zero. For other conversions, the behavior
>           is undefined.
> 
> Cheers,
> 
> Ben.
> 
> -- 
> Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
> Freelance Consultant and  Fax:   +44 (181) 994 6472
> Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
> A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
> London, England.          Apache-SSL author

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message