mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 15:25:33 +02:00
Fixed a couple of compiler warnings.
This commit is contained in:
parent
0f64a927a9
commit
094640c036
5 changed files with 12 additions and 14 deletions
|
|
@ -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))
|
||||
|
||||
/*********************************************************************//**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue