Re: [PATCH 3/5] evaluate: check variadic argument types against formatting info

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

 



On Tue, Oct 22, 2019 at 12:16:57PM +0100, Ben Dooks wrote:
> On 22/10/2019 11:26, Ben Dooks wrote:
> > On 20/10/2019 17:40, Luc Van Oostenryck wrote:
> > > On Wed, Sep 25, 2019 at 11:00:13AM +0100, Ben Dooks wrote:
> > > > +static int printf_fmt_string(struct format_type *fmt,
> > > > struct expression **expr, struct symbol *ctype, struct
> > > > symbol **target, const char **typediff)
> > > > +{
> > > > +    *target = &string_ctype;
> > > 
> > > This should be const_string_ctype and a test should be added for "%s"
> > > with a non-const char pointer/array.
> > 
> > ok.
> 
> I'm now getting weird issue with the tests failing. Example:
> 
> -varargs-format-addrspace1.c:12:32:    expected const char *
> +varargs-format-addrspace1.c:12:32:    expected char const *

Well, they're the same types and Sparse print them like this.
I would also prefer to have them with the qualifier in front
and that can be 'fixed' but it is orthogonal with this format checking.
Please use 'char const *' for the moment.

-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux