Commit 094640c0 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Fixed a couple of compiler warnings.

parent 0f64a927
......@@ -36,8 +36,8 @@ ENDIF()
# Turn on Werror (warning => error) when using maintainer mode.
IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -Werror")
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -Werror")
SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
ENDIF()
# Set warning flags for GCC/Clang
......
......@@ -729,33 +729,36 @@ my_context_continue(struct my_context *c)
#ifdef MY_CONTEXT_DISABLE
int
my_context_continue(struct my_context *c)
my_context_continue(struct my_context *c __attribute__((unused)))
{
return -1;
}
int
my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
my_context_spawn(struct my_context *c __attribute__((unused)),
void (*f)(void *) __attribute__((unused)),
void *d __attribute__((unused)))
{
return -1;
}
int
my_context_yield(struct my_context *c)
my_context_yield(struct my_context *c __attribute__((unused)))
{
return -1;
}
int
my_context_init(struct my_context *c, size_t stack_size)
my_context_init(struct my_context *c __attribute__((unused)),
size_t stack_size __attribute__((unused)))
{
return -1; /* Out of memory */
}
void
my_context_destroy(struct my_context *c)
my_context_destroy(struct my_context *c __attribute__((unused)))
{
}
......
......@@ -28,11 +28,6 @@
There is no reference counting and no unloading either.
*/
#if _MSC_VER
/* Silence warnings about variable 'unused' being used. */
#define FORCE_INIT_OF_VARS 1
#endif
#include <my_global.h>
#include "mysql.h"
#include <my_sys.h>
......
......@@ -1139,7 +1139,7 @@ recalculated
*/
#define DICT_TABLE_CHANGED_TOO_MUCH(t) \
((ib_int64_t) (t)->stat_modified_counter > (srv_stats_modified_counter ? \
ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \
(ib_int64_t) ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \
16 + (t)->stat_n_rows / 16))
/*********************************************************************//**
......
......@@ -1139,7 +1139,7 @@ recalculated
*/
#define DICT_TABLE_CHANGED_TOO_MUCH(t) \
((ib_int64_t) (t)->stat_modified_counter > (srv_stats_modified_counter ? \
ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \
(ib_int64_t) ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \
16 + (t)->stat_n_rows / 16))
/*********************************************************************//**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment