mirror of
https://github.com/MariaDB/server.git
synced 2025-07-21 23:40:10 +00:00
Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
This commit is contained in:
@ -249,12 +249,12 @@ print_decimal(const my_decimal *dec)
|
||||
int i, end;
|
||||
char buff[512], *pos;
|
||||
pos= buff;
|
||||
pos+= my_sprintf(buff, (buff, "Decimal: sign: %d intg: %d frac: %d { ",
|
||||
dec->sign(), dec->intg, dec->frac));
|
||||
pos+= sprintf(buff, "Decimal: sign: %d intg: %d frac: %d { ",
|
||||
dec->sign(), dec->intg, dec->frac);
|
||||
end= ROUND_UP(dec->frac)+ROUND_UP(dec->intg)-1;
|
||||
for (i=0; i < end; i++)
|
||||
pos+= my_sprintf(pos, (pos, "%09d, ", dec->buf[i]));
|
||||
pos+= my_sprintf(pos, (pos, "%09d }\n", dec->buf[i]));
|
||||
pos+= sprintf(pos, "%09d, ", dec->buf[i]);
|
||||
pos+= sprintf(pos, "%09d }\n", dec->buf[i]);
|
||||
fputs(buff, DBUG_FILE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user