<br><tt><font size=2>Eric Blake <eblake@redhat.com> wrote on 04/26/2010
01:00:45 PM:<br>
<br>
</font></tt>
<br><tt><font size=2>> <br>
> On 04/26/2010 10:44 AM, Stefan Berger wrote:<br>
> > With this patch I want to enable hex number inputs in the filter
XML. A<br>
> > number that was entered as hex is also printed as hex unless
a string<br>
> > representing the meaning can be found.<br>
> > <br>
> > I am also extending the schema and adding a test case. A problem
with<br>
> > the DSCP value is fixed on the way as well.<br>
> <br>
> ACK.<br>
> <br>
> > +               format = "%d";<br>
> > +<br>
> > +               switch (item->datatype)
{<br>
> >  <br>
> > +               case DATATYPE_UINT8_HEX:<br>
> > +                  
format = "0x%x";<br>
> >                 case
DATATYPE_IPMASK:<br>
> >                 case
DATATYPE_IPV6MASK:<br>
> >                  
  // display all masks in CIDR format<br>
> >                 case
DATATYPE_UINT8:<br>
> >                  
  storage_ptr = &item->u.u8;<br>
> > -                  
virBufferVSprintf(buf, "%d", *(uint8_t *)storage_ptr);<br>
> > +                  
virBufferVSprintf(buf, format, *(uint8_t *)storage_ptr);<br>
> <br>
> Gcc didn't warn about the use of a non-literal format argument here?
 At</font></tt>
<br>
<br><tt><font size=2>No, not a word from gcc (4.4.3 20100409). </font></tt>
<br>
<br><tt><font size=2>  Stefan</font></tt>
<br>