Begin making folly compile cleanly with a few of MSVC's sign mismatch warnings enabled
authorChristopher Dykes <cdykes@fb.com>
Fri, 2 Dec 2016 22:23:36 +0000 (14:23 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 2 Dec 2016 22:38:45 +0000 (14:38 -0800)
commit047e9e39c43e16a9c2221406f85fa3d8221c1f35
treebf43304e8d48cec7324e33ba06c1cb04cd4d18d4
parent853adb4fb8812b65e360dc77ae14f6013a19119f
Begin making folly compile cleanly with a few of MSVC's sign mismatch warnings enabled

Summary:
This makes the changes required to allow folly to compile cleanly with the sign/unsigned mismatch warnings 4388 and 4389, as well as with warnings 4804 and 4805, which are about comparisons between scalars and bool.
Most of the changes in this are to `DCHECK_*` calls which are translated to a templated call which does the comparison internally based on the inferred type of the argument, which for a literal `0` is `int`, causing the warnings to get generated when the comparison is done.

Reviewed By: yfeldblum

Differential Revision: D4253427

fbshipit-source-id: cd17973a78e948a62c886a2959f9abf40a69f9f5
19 files changed:
folly/Conv.h
folly/MemoryMapping.cpp
folly/String.cpp
folly/Traits.h
folly/detail/RangeSse42.cpp
folly/detail/ThreadLocalDetail.cpp
folly/experimental/DynamicParser.cpp
folly/experimental/Instructions.h
folly/experimental/bser/Dump.cpp
folly/experimental/observer/detail/GraphCycleDetector.h
folly/fibers/Fiber.cpp
folly/fibers/FiberManagerMap.cpp
folly/futures/Barrier.cpp
folly/io/IOBuf.cpp
folly/io/IOBuf.h
folly/portability/Sockets.cpp
folly/portability/SysUio.cpp
folly/stats/MultiLevelTimeSeries-defs.h
folly/stats/MultiLevelTimeSeries.h