summaryrefslogtreecommitdiff
path: root/sql/my_decimal.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:00:17 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-09 09:00:17 -0300
commit11fae04527098cb6c266eae41188504bd22a5b52 (patch)
tree92777d90b1eaff5ab0cb99603ecd3c4abf18d145 /sql/my_decimal.cc
parentcd37b73fe5107098c669fcbf569e9f20de013141 (diff)
downloadmariadb-git-11fae04527098cb6c266eae41188504bd22a5b52.tar.gz
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.
Diffstat (limited to 'sql/my_decimal.cc')
-rw-r--r--sql/my_decimal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index 208ddefb890..3aa01880b83 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -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);
}