Explicit typecast of unused constant to make 32 bit compiler happy.
authorMichael Callahan <michaelcallahan@fb.com>
Wed, 24 Aug 2016 20:48:02 +0000 (13:48 -0700)
committerFacebook Github Bot 3 <facebook-github-bot-3-bot@fb.com>
Wed, 24 Aug 2016 20:53:26 +0000 (13:53 -0700)
Summary:
GCC 5.3 is confused that we might be trying to assign a 64
bit value to a 32 bit size_t although we are clearly not.  Just
typecast the confusion away.

Reviewed By: yfeldblum

Differential Revision: D3762839

fbshipit-source-id: 1b705c4e70b782fdb106844fee52ab25aa038acd

folly/FBString.h

index d8e86a47af8c02f7df53ffe26a49b08c630cd561..bc5790ae43155ee3644eaa4361ddbbcaa37d541e 100644 (file)
@@ -812,7 +812,7 @@ private:
     maxMediumSize = 254 / sizeof(Char),            // coincides with the small
                                                    // bin size in dlmalloc
     categoryExtractMask = kIsLittleEndian
-      ? sizeof(size_t) == 4 ? 0xC0000000 : 0xC000000000000000
+      ? sizeof(size_t) == 4 ? 0xC0000000 : size_t(0xC000000000000000)
       : 0x3,
     capacityExtractMask = kIsLittleEndian
       ? ~categoryExtractMask