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
1=== modified file 'patches/warning_fixes.patch'
2--- patches/warning_fixes.patch 2011-12-13 15:06:50 +0000
3+++ patches/warning_fixes.patch 2012-03-25 10:18:18 +0000
4@@ -9,3 +9,23 @@
5 int error= 0;
6 struct timespec abstime;
7
8+--- a/storage/innobase/ibuf/ibuf0ibuf.c
9++++ b/storage/innobase/ibuf/ibuf0ibuf.c
10+@@ -1523,7 +1523,7 @@
11+
12+ for (i = 0; i < IBUF_OP_COUNT; i++) {
13+ #ifdef HAVE_ATOMIC_BUILTINS
14+- os_atomic_increment_ulint(&arr[i], ops[i]);
15++ (void) os_atomic_increment_ulint(&arr[i], ops[i]);
16+ #else /* HAVE_ATOMIC_BUILTINS */
17+ arr[i] += ops[i];
18+ #endif /* HAVE_ATOMIC_BUILTINS */
19+@@ -4785,7 +4785,7 @@
20+ mem_heap_free(heap);
21+
22+ #ifdef HAVE_ATOMIC_BUILTINS
23+- os_atomic_increment_ulint(&ibuf->n_merges, 1);
24++ (void) os_atomic_increment_ulint(&ibuf->n_merges, 1);
25+ ibuf_add_ops(ibuf->n_merged_ops, mops);
26+ ibuf_add_ops(ibuf->n_discarded_ops, dops);
27+ #else /* HAVE_ATOMIC_BUILTINS */

Subscribers

People subscribed via source and target branches