Merge lp:~laurynas-biveinis/percona-server/bug962940-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 230
Proposed branch: lp:~laurynas-biveinis/percona-server/bug962940-5.5
Merge into: lp:percona-server/5.5
Diff against target: 27 lines (+20/-0)
1 file modified
patches/warning_fixes.patch (+20/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug962940-5.5
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+99202@code.launchpad.net

Description of the change

    Fix bug 962940: InnoDB compilation warnings:

    [ 48%] Building C object storage/innobase/CMakeFiles/innobase.dir/ibuf/ibuf0ibuf.c.o
    cc1: warnings being treated as errors
    /home/jenkins/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/centos5-32/Percona-Server-5.5.21-rel24.2/storage/innobase/ibuf/ibuf0ibuf.c: In function 'ibuf_add_ops':
    /home/jenkins/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/centos5-32/Percona-Server-5.5.21-rel24.2/storage/innobase/ibuf/ibuf0ibuf.c:1526: warning: value computed is not used
    /home/jenkins/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/centos5-32/Percona-Server-5.5.21-rel24.2/storage/innobase/ibuf/ibuf0ibuf.c: In function 'ibuf_merge_or_delete_for_page':
    /home/jenkins/workspace/percona-server-5.5-trunk/BUILD_TYPE/debug/Host/centos5-32/Percona-Server-5.5.21-rel24.2/storage/innobase/ibuf/ibuf0ibuf.c:4788: warning: value computed is not used
    make[2]: ***
    [storage/innobase/CMakeFiles/innobase.dir/ibuf/ibuf0ibuf.c.o] Error 1

    The fix is to cast invocations of os_atomic_* functions to (void) to
    show that we intentionally discard it.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'patches/warning_fixes.patch'
--- patches/warning_fixes.patch 2011-12-13 15:06:50 +0000
+++ patches/warning_fixes.patch 2012-03-25 10:18:18 +0000
@@ -9,3 +9,23 @@
9 int error= 0;9 int error= 0;
10 struct timespec abstime;10 struct timespec abstime;
11 11
12--- a/storage/innobase/ibuf/ibuf0ibuf.c
13+++ b/storage/innobase/ibuf/ibuf0ibuf.c
14@@ -1523,7 +1523,7 @@
15
16 for (i = 0; i < IBUF_OP_COUNT; i++) {
17 #ifdef HAVE_ATOMIC_BUILTINS
18- os_atomic_increment_ulint(&arr[i], ops[i]);
19+ (void) os_atomic_increment_ulint(&arr[i], ops[i]);
20 #else /* HAVE_ATOMIC_BUILTINS */
21 arr[i] += ops[i];
22 #endif /* HAVE_ATOMIC_BUILTINS */
23@@ -4785,7 +4785,7 @@
24 mem_heap_free(heap);
25
26 #ifdef HAVE_ATOMIC_BUILTINS
27- os_atomic_increment_ulint(&ibuf->n_merges, 1);
28+ (void) os_atomic_increment_ulint(&ibuf->n_merges, 1);
29 ibuf_add_ops(ibuf->n_merged_ops, mops);
30 ibuf_add_ops(ibuf->n_discarded_ops, dops);
31 #else /* HAVE_ATOMIC_BUILTINS */

Subscribers

People subscribed via source and target branches