diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
commit | 11fae04527098cb6c266eae41188504bd22a5b52 (patch) | |
tree | 92777d90b1eaff5ab0cb99603ecd3c4abf18d145 /client | |
parent | cd37b73fe5107098c669fcbf569e9f20de013141 (diff) | |
download | mariadb-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 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 2 | ||||
-rw-r--r-- | client/mysqlcheck.c | 3 | ||||
-rw-r--r-- | client/sql_string.cc | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 30bdb58153f..dec3f142798 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -437,7 +437,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname, ptr= fname + target_dir_name_len; memcpy(ptr,bname,blen); ptr+= blen; - ptr+= my_sprintf(ptr, (ptr, "-%x", file_id)); + ptr+= sprintf(ptr, "-%x", file_id); if ((file= create_unique_file(fname,ptr)) < 0) { diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 4183ab1dd5e..78c4b79085e 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -703,8 +703,7 @@ static int handle_request_for_tables(char *tables, uint length) if (opt_all_in_1) { /* No backticks here as we added them before */ - query_length= my_sprintf(query, - (query, "%s TABLE %s %s", op, tables, options)); + query_length= sprintf(query, "%s TABLE %s %s", op, tables, options); } else { diff --git a/client/sql_string.cc b/client/sql_string.cc index dc6147b563f..50fb4a5b777 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -122,7 +122,8 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) str_charset=cs; if (decimals >= NOT_FIXED_DEC) { - uint32 len= my_sprintf(buff,(buff, "%.15g",num));// Enough for a DATETIME + // Enough for a DATETIME + uint32 len= sprintf(buff, "%.15g", num); return copy(buff, len, &my_charset_latin1, cs, &dummy_errors); } #ifdef HAVE_FCONVERT @@ -674,7 +675,7 @@ void String::qs_append(const char *str, uint32 len) void String::qs_append(double d) { char *buff = Ptr + str_length; - str_length+= my_sprintf(buff, (buff, "%.15g", d)); + str_length+= sprintf(buff, buff, "%.15g", d); } void String::qs_append(double *d) |