From cedbb3d0781be869369d1b34d3a06234a6ca1f3a Mon Sep 17 00:00:00 2001 From: Andrew Gallagher Date: Tue, 7 Aug 2012 22:49:39 -0700 Subject: [PATCH] fbstring: mute uninitialized warnings in fbstring code Summary: fbstring generates some apparently false positive uninitialized warnings under gcc-4.7.1. This diff disables the '-Wuninitialized' flag for fbstring. Test Plan: build Reviewed By: ldemailly@fb.com FB internal diff: D542722 --- folly/FBString.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/folly/FBString.h b/folly/FBString.h index 1f1e7b8d..3fd59ab4 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -236,6 +236,13 @@ private: }; */ +/** + * gcc-4.7 throws what appears to be some false positive uninitialized + * warnings for the members of the MediumLarge struct. So, mute them here. + */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wuninitialized" + /** * This is the core of the string. The code should work on 32- and * 64-bit architectures and with any Char size. Porting to big endian @@ -815,6 +822,8 @@ private: } }; +# pragma GCC diagnostic pop + #ifndef _LIBSTDCXX_FBSTRING /** * Dummy fbstring core that uses an actual std::string. This doesn't -- 2.34.1