Skip to content

Commit 8e3680c

Browse files
committed
Fix Bug#20380977 COMPILER WARNINGS IN MYSQL-5.6
This is a followup patch to the original 93ba52c which silences another set of warnings produced for variables that are always defined but used only in debug builds.
1 parent 6b02da5 commit 8e3680c

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

sql/opt_range.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
1+
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights
22
* reserved.
33
44
This program is free software; you can redistribute it and/or modify
@@ -8774,7 +8774,6 @@ int test_rb_tree(SEL_ARG *element,SEL_ARG *parent)
87748774
}
87758775
return -1; // Error, no more warnings
87768776
}
8777-
#endif
87788777

87798778

87808779
/**
@@ -8836,7 +8835,6 @@ static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key)
88368835
}
88378836

88388837

8839-
#ifndef DBUG_OFF
88408838
/*
88418839
Check if SEL_ARG::use_count value is correct
88428840

sql/sql_audit.cc

+2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ static audit_handler_t audit_handlers[] =
120120
general_class_handler, connection_class_handler
121121
};
122122

123+
#ifndef DBUG_OFF
123124
static const uint audit_handlers_count=
124125
(sizeof(audit_handlers) / sizeof(audit_handler_t));
126+
#endif /* DBUG_OFF */
125127

126128

127129
/**

storage/innobase/lock/lock0lock.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -378,8 +378,10 @@ because there is no parallel deadlock check. This stack is protected by
378378
the lock_sys_t::mutex. */
379379
static lock_stack_t* lock_stack;
380380

381+
#ifdef UNIV_DEBUG
381382
/** The count of the types of locks. */
382383
static const ulint lock_types = UT_ARR_SIZE(lock_compatibility_matrix);
384+
#endif /* UNIV_DEBUG */
383385

384386
#ifdef UNIV_PFS_MUTEX
385387
/* Key to register mutex with performance schema */

storage/innobase/sync/sync0sync.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2008, Google Inc.
55
66
Portions of this file contain modifications contributed and copyrighted by
@@ -298,9 +298,9 @@ mutex_create_func(
298298

299299
/* NOTE! The very first mutexes are not put to the mutex list */
300300

301-
if ((mutex == &mutex_list_mutex)
301+
if (mutex == &mutex_list_mutex
302302
#ifdef UNIV_SYNC_DEBUG
303-
|| (mutex == &sync_thread_mutex)
303+
|| mutex == &sync_thread_mutex
304304
#endif /* UNIV_SYNC_DEBUG */
305305
) {
306306

0 commit comments

Comments
 (0)