Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10980
Merged at revision: 11019
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 101 lines (+36/-11)
3 files modified
include/zorba/config.h.cmake (+10/-0)
src/runtime/full_text/ft_module_impl.cpp (+9/-11)
src/util/icu_streambuf.cpp (+17/-0)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+121978@code.launchpad.net

Commit message

Suppressed warnings; moved gcc diagnostic push macros to config.h.

Description of the change

Suppressed warnings; moved gcc diagnostic push macros to config.h.

To post a comment you must log in.
lp:~paul-lucas/zorba/pjl-misc updated
10977. By Paul J. Lucas

Forgot a file.

Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

/home/mbrantner/zorba/sandbox/src/runtime/full_text/ft_module_impl.cpp:511:33: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]

review: Needs Fixing
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

I don't know what compiler you're using, but that line isn't any different than before (that's why it's neither green nor red in the diff).

lp:~paul-lucas/zorba/pjl-misc updated
10978. By Paul J. Lucas

Tweaked #pragmas.

10979. By Paul J. Lucas

More #pragma tweaking.

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

Fixed.

lp:~paul-lucas/zorba/pjl-misc updated
10980. By Paul J. Lucas

Merge from trunk.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2012-09-04T04-02-04.988Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/zorba/config.h.cmake'
2--- include/zorba/config.h.cmake 2012-08-30 13:45:43 +0000
3+++ include/zorba/config.h.cmake 2012-08-30 23:52:21 +0000
4@@ -147,6 +147,16 @@
5 # define ZORBA_TR1_NS std
6 #endif
7
8+////////// GCC diagnostics ////////////////////////////////////////////////////
9+
10+#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 460)
11+# define GCC_GREATER_EQUAL_460 1
12+#endif
13+
14+#if defined( GCC_GREATER_EQUAL_460 ) || defined( __llvm__ )
15+# define GCC_PRAGMA_DIAGNOSTIC_PUSH 1
16+#endif
17+
18 ////////// Zorba //////////////////////////////////////////////////////////////
19
20 // Version
21
22=== modified file 'src/runtime/full_text/ft_module_impl.cpp'
23--- src/runtime/full_text/ft_module_impl.cpp 2012-08-30 13:45:43 +0000
24+++ src/runtime/full_text/ft_module_impl.cpp 2012-08-30 23:52:21 +0000
25@@ -504,18 +504,13 @@
26
27 ///////////////////////////////////////////////////////////////////////////////
28
29-#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 460)
30-# define GCC_GREATER_EQUAL_460 1
31-#endif
32-
33-#if defined( GCC_GREATER_EQUAL_460 ) || defined( __llvm__ )
34-# define GCC_PRAGMA_DIAGNOSTIC_PUSH 1
35-#endif
36-
37-#ifdef GCC_PRAGMA_DIAGNOSTIC_PUSH
38-# pragma GCC diagnostic push
39+#ifdef __GNUC__
40+# ifdef GCC_PRAGMA_DIAGNOSTIC_PUSH
41+# pragma GCC diagnostic push
42+# endif /* GCC_PRAGMA_DIAGNOSTIC_PUSH */
43+# pragma GCC diagnostic ignored "-Wpragmas"
44 # pragma GCC diagnostic ignored "-Wbind-to-temporary-copy"
45-#endif /* GCC_PRAGMA_DIAGNOSTIC_PUSH */
46+#endif /* __GNUC__ */
47
48 bool ThesaurusLookupIterator::nextImpl( store::Item_t &result,
49 PlanState &plan_state ) const {
50@@ -612,6 +607,9 @@
51
52 #ifdef GCC_PRAGMA_DIAGNOSTIC_PUSH
53 # pragma GCC diagnostic pop
54+#else
55+# pragma GCC diagnostic warning "-Wbind-to-temporary-copy"
56+# pragma GCC diagnostic warning "-Wpragmas"
57 #endif /* GCC_PRAGMA_DIAGNOSTIC_PUSH */
58
59 ///////////////////////////////////////////////////////////////////////////////
60
61=== modified file 'src/util/icu_streambuf.cpp'
62--- src/util/icu_streambuf.cpp 2012-08-30 13:45:43 +0000
63+++ src/util/icu_streambuf.cpp 2012-08-30 23:52:21 +0000
64@@ -25,6 +25,7 @@
65 #include <cassert>
66 #include <stdexcept>
67
68+#include <zorba/config.h>
69 #include <zorba/diagnostic_list.h>
70
71 #include "diagnostics/assert.h"
72@@ -177,6 +178,16 @@
73 return c;
74 }
75
76+#ifdef __GNUC__
77+# ifdef GCC_PRAGMA_DIAGNOSTIC_PUSH
78+# pragma GCC diagnostic push
79+# endif /* GCC_PRAGMA_DIAGNOSTIC_PUSH */
80+//
81+// Disables warnings about p.pivot_buf_ + sizeof p.pivot_buf_.
82+//
83+# pragma GCC diagnostic ignored "-Warray-bounds"
84+#endif /* __GNUC__ */
85+
86 bool icu_streambuf::to_external( char_type const **from,
87 char_type const *from_end, char **to,
88 char const *to_end, bool flush ) {
89@@ -215,6 +226,12 @@
90 return true;
91 }
92
93+#ifdef GCC_PRAGMA_DIAGNOSTIC_PUSH
94+# pragma GCC diagnostic pop
95+#else
96+# pragma GCC diagnostic warning "-Warray-bounds"
97+#endif /* GCC_PRAGMA_DIAGNOSTIC_PUSH */
98+
99 icu_streambuf::int_type icu_streambuf::underflow() {
100 #if ZORBA_DEBUG_ICU_STREAMBUF
101 printf( "underflow()\n" );

Subscribers

People subscribed via source and target branches