Skip to content

Commit

Permalink
fbstring: mute uninitialized warnings in fbstring code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andrewjcg authored and tudor committed Aug 8, 2012
1 parent 6641583 commit cedbb3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions folly/FBString.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ class fbstring_core_model {
};
*/

/**
* 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
Expand Down Expand Up @@ -815,6 +822,8 @@ template <class Char> class fbstring_core {
}
};

# pragma GCC diagnostic pop

#ifndef _LIBSTDCXX_FBSTRING
/**
* Dummy fbstring core that uses an actual std::string. This doesn't
Expand Down

0 comments on commit cedbb3d

Please sign in to comment.