diff options
author | Michael Widenius <monty@askmonty.org> | 2012-10-04 23:58:59 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-10-04 23:58:59 +0300 |
commit | be4cea7ef22e4d5108479b2e76972803e4c6a92e (patch) | |
tree | 018c5a29895d7c4e347085624a922d603ba5c938 | |
parent | 1ab7dfe5196a75fefb78ebc58d5fbf12c8f5444d (diff) | |
download | mariadb-git-be4cea7ef22e4d5108479b2e76972803e4c6a92e.tar.gz |
Fixed compiler warnings
sql/rpl_mi.cc:
Fixed compiler warning
support-files/compiler_warnings.supp:
Supress warning about offsetof macro. (ok in this case)
-rw-r--r-- | sql/rpl_mi.cc | 3 | ||||
-rw-r--r-- | support-files/compiler_warnings.supp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index e004e3495c7..fc13fb2c762 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -666,7 +666,8 @@ void create_logfile_name_with_suffix(char *res_file_name, uint length, length-= (suffix->length - ext_pos); /* Leave place for extension */ p= res_file_name + ext_pos; *p++= '-'; /* Add separator */ - p= strmake(p, res, min(length - (p - res_file_name), res_length)); + p= strmake(p, res, min((size_t) (length - (p - res_file_name)), + res_length)); /* Add back extension. We have checked above that there is space for it */ strmov(p, ext); } diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index e18c44bf5ed..107c306421a 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -193,6 +193,8 @@ ma_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550 # .* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.* ctype-simple\.c : .*unary minus operator applied to unsigned type, result still unsigned.* +sql/sys_vars\.cc : invalid access to non-static data member +sql/sys_vars\.cc : perhaps the 'offsetof' macro was used incorrectly # Wrong warning due to GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478 regexec\.c : passing argument 3 of.*matcher.* discards qualifiers from pointer target type |