Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pulled out one of the fixes in D63028314 into this diff. The rest of the D63028314 fixes the this-capture compiler warning-turned-error, but that's being suppressed globally (for just Mac builds) via https://www.internalfb.com/code/fbsource/[147e83ce8584d0a790b68a5e9196e84e4834179d]/fbcode/tools/build/buck/gen_modes.py?lines=3764 Both "xbat" which is Xcode 16 clang, and "pika-16", based off a branch cut that brings pika to a clang close to Xcode 16 clang fail with this error: ``` fbcode/folly/GroupVarint.h:80:24: error: arithmetic between different enumeration types ('folly::detail::GroupVarintBase<unsigned int>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:52:3)' and 'folly::detail::GroupVarintBase<unsigned int>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:60:3)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion] 80 | return kHeaderSize + kGroupSize + key(a) + key(b) + key(c) + key(d); | ~~~~~~~~~~~ ^ ~~~~~~~~~~ fbcode/folly/GroupVarint.h:135:24: error: arithmetic between different enumeration types ('folly::detail::GroupVarintBase<unsigned int>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:52:3)' and 'folly::detail::GroupVarintBase<unsigned int>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:60:3)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion] 135 | return kHeaderSize + kGroupSize + b0key(uint8_t(*p)) + b1key(uint8_t(*p)) + | ~~~~~~~~~~~ ^ ~~~~~~~~~~ fbcode/folly/GroupVarint.h:280:24: error: arithmetic between different enumeration types ('folly::detail::GroupVarintBase<unsigned long long>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:52:3)' and 'folly::detail::GroupVarintBase<unsigned long long>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:60:3)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion] 280 | return kHeaderSize + kGroupSize + key(a) + key(b) + key(c) + key(d) + | ~~~~~~~~~~~ ^ ~~~~~~~~~~ fbcode/folly/GroupVarint.h:343:24: error: arithmetic between different enumeration types ('folly::detail::GroupVarintBase<unsigned long long>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:52:3)' and 'folly::detail::GroupVarintBase<unsigned long long>::(unnamed enum at fbcode/folly/detail/GroupVarintDetail.h:60:3)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion] 343 | return kHeaderSize + kGroupSize + b0key(n) + b1key(n) + b2key(n) + | ~~~~~~~~~~~ ^ ~~~~~~~~~~ 4 errors generated. ``` This diff type-casts the offending args. Reviewed By: Gownta Differential Revision: D63461177 fbshipit-source-id: 89e16365baef5ba8711c0cacb9bd6e44aa25c480
- Loading branch information