1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

Fix some warnings on Windows compilation

- silence warnings in ed25519 reference implementation
- fix signed/unsigned warning in popular header item_func.h
This commit is contained in:
Vladislav Vaintroub
2017-03-24 10:02:31 +01:00
parent d7c35a9992
commit 716188f1d4
3 changed files with 7 additions and 3 deletions

View File

@@ -14,8 +14,12 @@ SET(REF10_SOURCES
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
ADD_CONVENIENCE_LIBRARY(ref10 ${REF10_SOURCES})
IF(MSVC)
# Silence conversion (integer truncantion) warnings from reference code
SET_TARGET_PROPERTIES(ref10 PROPERTIES COMPILE_FLAGS "/wd4244 /wd4146")
ENDIF()
MYSQL_ADD_PLUGIN(auth_ed25519 server_ed25519.c ${REF10_SOURCES} MODULE_ONLY)
MYSQL_ADD_PLUGIN(auth_ed25519 server_ed25519.c MODULE_ONLY LINK_LIBRARIES ref10)
MYSQL_ADD_PLUGIN(client_ed25519 client_ed25519.c MODULE_ONLY
CLIENT LINK_LIBRARIES mysys_ssl ref10 COMPONENT ClientPlugins)

View File

@@ -633,7 +633,7 @@ public:
Reserve max_length to fit at least one character for one digit,
plus one character for the sign (if signed).
*/
set_if_bigger(char_length, 1 + (unsigned_flag ? 0 : 1));
set_if_bigger(char_length, 1U + (unsigned_flag ? 0 : 1));
fix_char_length(char_length);
}
virtual void print(String *str, enum_query_type query_type);

View File

@@ -469,7 +469,7 @@ int my_wc_mb_utf8_with_escape(CHARSET_INFO *cs, my_wc_t escape, my_wc_t wc,
DBUG_ASSERT(escape > 0);
if (str + 1 >= end)
return MY_CS_TOOSMALL2; // Not enough space, need at least two bytes.
*str= escape;
*str= (uchar)escape;
int cnvres= my_charset_utf8_handler.wc_mb(cs, wc, str + 1, end);
if (cnvres > 0)
return cnvres + 1; // The character was normally put