]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
locally disable pragma warnings on gcc < 4.6 3672/head
authorJosh Durgin <jdurgin@redhat.com>
Mon, 9 Feb 2015 23:00:18 +0000 (15:00 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Mon, 9 Feb 2015 23:48:15 +0000 (15:48 -0800)
diagnostic push|pop are not present before 4.6, so each use gives a
warning. Temporarily ignore these by disabling/reenabling -Wpragmas.
Note that this means the other disabled warnings are not scoped on
old gcc. I don't think this is worth fixing, since newer gcc will
respect the scope and show us the warnings outside of it.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/include/encoding.h
src/os/Transaction.cc
src/osd/PG.cc
src/test/librados/list.cc
src/test/librados/watch_notify.cc
src/test/multi_stress_watch.cc
src/test/system/st_rados_notify.cc
src/test/system/st_rados_watch.cc
src/test/test_stress_watch.cc
src/tools/ceph_objectstore_tool.cc
src/tools/scratchtoolpp.cc

index bd941656340f5d1abfd8fb6b530ee143b1c7cf8c..7b976f24b57885ad93d7fbf8d6ba10270fb71de5 100644 (file)
@@ -306,6 +306,7 @@ inline void encode(const boost::optional<T> &p, bufferlist &bl)
     encode(p.get(), bl);
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wuninitialized"
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
@@ -321,6 +322,7 @@ inline void decode(boost::optional<T> &p, bufferlist::iterator &bp)
   }
 }
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 //triple tuple
 template<class A, class B, class C>
index d219108fac11319cdafdcc17d08a349a5964dde7..fdbfa3bdb5f165840f98fc425f0a0a94c88d067a 100644 (file)
@@ -4,6 +4,7 @@
 #include "ObjectStore.h"
 #include "common/Formatter.h"
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -504,6 +505,7 @@ void ObjectStore::Transaction::_build_actions_from_tbl()
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 void ObjectStore::Transaction::dump(ceph::Formatter *f)
 {
@@ -932,6 +934,7 @@ void ObjectStore::Transaction::dump(ceph::Formatter *f)
   f->close_section();
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -981,3 +984,4 @@ void ObjectStore::Transaction::generate_test_instances(list<ObjectStore::Transac
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
index d1752e8fe085f381e5e0ff8571f7431b1b994019..84bf118d86f69648b27ca091a6b7fc5adb5f45cf 100644 (file)
@@ -2515,6 +2515,7 @@ void PG::init(
   write_if_dirty(*t);
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -2555,6 +2556,7 @@ void PG::upgrade(ObjectStore *store, const interval_set<snapid_t> &snapcolls)
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 void PG::_upgrade_v7(ObjectStore *store, const interval_set<snapid_t> &snapcolls)
 {
@@ -2753,6 +2755,7 @@ void PG::write_info(ObjectStore::Transaction& t)
   dirty_big_info = false;
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -2843,6 +2846,7 @@ epoch_t PG::peek_map_epoch(ObjectStore *store,
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 void PG::write_if_dirty(ObjectStore::Transaction& t)
 {
index 50d0d281882aeaf57bcec7a950c714f1f13fba67..0e6aa5b3b632d9306e405b7b6eb4f8abd4b94d26 100644 (file)
@@ -34,6 +34,7 @@ TEST_F(LibRadosList, ListObjects) {
   rados_objects_list_close(ctx);
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -154,6 +155,7 @@ static void check_list(std::set<std::string>& myset, rados_list_ctx_t& ctx)
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 TEST_F(LibRadosList, ListObjectsNS) {
   char buf[128];
@@ -207,6 +209,7 @@ TEST_F(LibRadosList, ListObjectsNS) {
   ASSERT_EQ(-EINVAL, rados_objects_list_open(ioctx, &ctx));
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -474,6 +477,7 @@ TEST_F(LibRadosListECPP, ListObjectsEndIter) {
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 TEST_F(LibRadosListEC, ListObjectsNS) {
   char buf[128];
@@ -570,6 +574,7 @@ TEST_F(LibRadosListECPP, ListObjectsPPNS) {
   EXPECT_THROW(check_listpp(def, ioctx), std::runtime_error);
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -661,3 +666,4 @@ TEST_F(LibRadosListECPP, ListObjectsStartPP) {
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
index 80a69df295fcef703e774b7aea607477806cdc05..9a55144632c5365939a5d6ab26492818b8500b8b 100644 (file)
@@ -98,6 +98,7 @@ public:
 
 // --
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -215,6 +216,7 @@ TEST_F(LibRadosWatchNotifyECPP, WatchNotifyTimeout) {
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 
 // --
index aa02d6941dbb2cb67efe29c110ecea2512630f1f..25f735558f5c3721969bf011c9b0092aa9c4e3cf 100644 (file)
@@ -29,6 +29,7 @@ public:
     }
 };
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -67,6 +68,7 @@ test_loop(Rados &cluster, std::string pool_name, std::string obj_name)
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 void
 test_replicated(Rados &cluster, std::string pool_name, std::string obj_name)
index b5fea3ecab27adaef5f1e26c1d19fad51d760090..ecdf1c7c149720a636c3547ea7f9fe4713ebfc16 100644 (file)
@@ -38,6 +38,7 @@ StRadosNotify::~StRadosNotify()
 {
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -77,3 +78,4 @@ int StRadosNotify::run()
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
index 7f837f532b0ebaf64a22f2f8446e4400970ffc44..4909f37ae939b872c19e7065f1a08d8f71a3391d 100644 (file)
@@ -47,6 +47,7 @@ StRadosWatch::
 {
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -100,3 +101,4 @@ run()
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
index 168714bba28ac6db3cfc6393e37869263bcb8fa5..1f9bed9be6ed71cd207fe00be9bd60ef4d71a673 100644 (file)
@@ -35,6 +35,7 @@ public:
     }
 };
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -122,3 +123,4 @@ TEST_P(WatchStress, Stress1) {
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
index 369a424034129ac9754ce38ce55a197f5a13f358..cf27e11f4f3df57fc228e6f5c84dbec40e046d24 100644 (file)
@@ -727,6 +727,7 @@ int finish_remove_pgs(ObjectStore *store)
   return 0;
 }
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -766,6 +767,7 @@ int mark_pg_for_removal(ObjectStore *fs, spg_t pgid, ObjectStore::Transaction *t
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"
 
 int initiate_new_remove_pg(ObjectStore *store, spg_t r_pgid)
 {
index 24dba3acfe2203c7deab9ddab1952bc70ed2fea4..f622d7a1eed839b8c572cd0b17f83c24e7119ca8 100644 (file)
@@ -23,6 +23,7 @@ using namespace librados;
 #include <stdlib.h>
 #include <time.h>
 
+#pragma GCC diagnostic ignored "-Wpragmas"
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
@@ -317,3 +318,4 @@ int main(int argc, const char **argv)
 }
 
 #pragma GCC diagnostic pop
+#pragma GCC diagnostic warning "-Wpragmas"