From: Andrew Gallagher Date: Wed, 8 Aug 2012 05:49:39 +0000 (-0700) Subject: fbstring: mute uninitialized warnings in fbstring code X-Git-Tag: v0.22.0~1228 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cedbb3d0781be869369d1b34d3a06234a6ca1f3a;p=folly.git 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 --- 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