Browse Source

Fixed a couple of compiler warnings.

pull/73/head
Sergey Vojtovich 11 years ago
parent
commit
094640c036
  1. 4
      cmake/maintainer.cmake
  2. 13
      mysys/my_context.c
  3. 5
      sql-common/client_plugin.c
  4. 2
      storage/innobase/include/dict0dict.h
  5. 2
      storage/xtradb/include/dict0dict.h

4
cmake/maintainer.cmake

@ -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

13
mysys/my_context.c

@ -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)))
{
}

5
sql-common/client_plugin.c

@ -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>

2
storage/innobase/include/dict0dict.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))
/*********************************************************************//**

2
storage/xtradb/include/dict0dict.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))
/*********************************************************************//**

Loading…
Cancel
Save