From ed9ffc6b09a13197f3aadaf89c1dd3accee2dfd1 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 9 Jul 2010 09:00:17 -0300 Subject: 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. --- sql/partition_info.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/partition_info.cc') diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 6e2f7dfad26..d85888e295c 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -103,8 +103,8 @@ char *partition_info::create_default_partition_names(uint part_no, { do { - my_sprintf(move_ptr, (move_ptr,"p%u", (start_no + i))); - move_ptr+=MAX_PART_NAME_SIZE; + sprintf(move_ptr, "p%u", (start_no + i)); + move_ptr+= MAX_PART_NAME_SIZE; } while (++i < no_parts_arg); } else @@ -135,7 +135,7 @@ char *partition_info::create_subpartition_name(uint subpart_no, if (likely(ptr != NULL)) { - my_sprintf(ptr, (ptr, "%ssp%u", part_name, subpart_no)); + my_snprintf(ptr, size_alloc, "%ssp%u", part_name, subpart_no); } else { -- cgit v1.2.1