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:
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user