mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
2011-02-26 Michael Snyder <msnyder@vmware.com>
* utils.c (decimal2str): Eliminate dead code and dead param. (pulongest): Drop dead param from call to decimal2str. (plongest): Ditto.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-02-26 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
|
* utils.c (decimal2str): Eliminate dead code and dead param.
|
||||||
|
(pulongest): Drop dead param from call to decimal2str.
|
||||||
|
(plongest): Ditto.
|
||||||
|
|
||||||
2011-02-24 Joel Brobecker <brobecker@adacore.com>
|
2011-02-24 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
Revert the following patch (not approved yet):
|
Revert the following patch (not approved yet):
|
||||||
|
@ -256,14 +256,15 @@ xsnprintf (char *str, size_t size, const char *format, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
decimal2str (char *sign, ULONGEST addr, int width)
|
decimal2str (char *sign, ULONGEST addr)
|
||||||
{
|
{
|
||||||
/* Steal code from valprint.c:print_decimal(). Should this worry
|
/* Steal code from valprint.c:print_decimal(). Should this worry
|
||||||
about the real size of addr as the above does? */
|
about the real size of addr as the above does? */
|
||||||
unsigned long temp[3];
|
unsigned long temp[3];
|
||||||
char *str = get_cell ();
|
char *str = get_cell ();
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
int width;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
temp[i] = addr % (1000 * 1000 * 1000);
|
temp[i] = addr % (1000 * 1000 * 1000);
|
||||||
@ -274,8 +275,6 @@ decimal2str (char *sign, ULONGEST addr, int width)
|
|||||||
while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0])));
|
while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0])));
|
||||||
|
|
||||||
width = 9;
|
width = 9;
|
||||||
if (width < 0)
|
|
||||||
width = 0;
|
|
||||||
|
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
@ -304,7 +303,7 @@ decimal2str (char *sign, ULONGEST addr, int width)
|
|||||||
char *
|
char *
|
||||||
pulongest (ULONGEST u)
|
pulongest (ULONGEST u)
|
||||||
{
|
{
|
||||||
return decimal2str ("", u, 0);
|
return decimal2str ("", u);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* %d for LONGEST. The result is stored in a circular static buffer,
|
/* %d for LONGEST. The result is stored in a circular static buffer,
|
||||||
@ -314,9 +313,9 @@ char *
|
|||||||
plongest (LONGEST l)
|
plongest (LONGEST l)
|
||||||
{
|
{
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
return decimal2str ("-", -l, 0);
|
return decimal2str ("-", -l);
|
||||||
else
|
else
|
||||||
return decimal2str ("", l, 0);
|
return decimal2str ("", l);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Eliminate warning from compiler on 32-bit systems. */
|
/* Eliminate warning from compiler on 32-bit systems. */
|
||||||
|
Reference in New Issue
Block a user