Fix some clang compiler warnings/errors
authorGaurav Jain <gjain@fb.com>
Thu, 6 Dec 2012 19:26:17 +0000 (11:26 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:49:32 +0000 (14:49 -0800)
commit83da0042ba4f4c6622bde2002a0bd968de1ed701
tree481502244f531fa1a4b95d178752aa90b6a2cbaf
parent06eaa4f3ae4e385b8e85ae76db9ffaa8103edad0
Fix some clang compiler warnings/errors

Summary:
Fixes instances of the following problems:
error: offset of on non-POD type 'folly::fbstring_core<char>::RefCounted'
[-Werror,-Winvalid-offsetof]
Solution: Since the atomic is not a POD I used sizeof() instead to calculate
the offset

warning: C++11 requires lambda with omitted result type to consist of a single
return statement
Solution: Specify a return type

error: in-class initializer for static data member is not a constant expression
Solution: Move initializer

Test Plan: - Compiled folly and ran fbmake runtests

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D656963
folly/FBString.h
folly/Range.h
folly/Traits.h
folly/json.cpp
folly/small_vector.h
folly/stats/BucketedTimeSeries-defs.h