opcodes: bfin: simplify field width processing and fix build warnings
This fix the build time warning: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
e4967d72f9
commit
5de10af023
2 changed files with 6 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-04-01 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* bfin-dis.c (fmtconst): Replace decimal handling with a single
|
||||
sprintf call and the '*' field width.
|
||||
|
||||
2012-03-23 Maxim Kuvyrkov <maxim@codesourcery.com>
|
||||
|
||||
* mips-dis.c (mips_arch_choices): Add entry for Broadcom XLP.
|
||||
|
|
|
@ -162,16 +162,7 @@ fmtconst (const_forms_t cf, TIword x, bfd_vma pc, disassemble_info *outf)
|
|||
x <<= constant_formats[cf].scale;
|
||||
|
||||
if (constant_formats[cf].decimal)
|
||||
{
|
||||
if (constant_formats[cf].leading)
|
||||
{
|
||||
char ps[10];
|
||||
sprintf (ps, "%%%ii", constant_formats[cf].leading);
|
||||
sprintf (buf, ps, x);
|
||||
}
|
||||
else
|
||||
sprintf (buf, "%li", x);
|
||||
}
|
||||
sprintf (buf, "%*li", constant_formats[cf].leading, x);
|
||||
else
|
||||
{
|
||||
if (constant_formats[cf].issigned && x < 0)
|
||||
|
|
Loading…
Reference in a new issue