Make most implicit integer truncations and sign conversions explicit
authorChristopher Dykes <cdykes@fb.com>
Fri, 27 Jan 2017 02:01:31 +0000 (18:01 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 27 Jan 2017 02:03:01 +0000 (18:03 -0800)
commitfa172175980b13569ba42008202a857af6e959dd
tree6fbc06e85e4279ce7d82fde87fbc2f6326478d42
parentcc0ca971057edb5e4c8f78946b0c5508395ecc48
Make most implicit integer truncations and sign conversions explicit

Summary:
This makes a large number of implicit truncations and sign conversions into explicit casts, in preparation for eventually enabling `-Wconversion` on Folly.
This set of changes should have zero semantic change.

This focuses on the core of Folly and leaves the tests alone for the most part. A future diff will cleanup the warnings in the tests as well.

Reviewed By: yfeldblum

Differential Revision: D4454096

fbshipit-source-id: af1e1831675a804ec5679266c30c1fae62e8c35c
78 files changed:
folly/AtomicHashMap-inl.h
folly/AtomicHashMap.h
folly/AtomicUnorderedMap.h
folly/Benchmark.cpp
folly/Benchmark.h
folly/Bits.h
folly/ConcurrentSkipList-inl.h
folly/ConcurrentSkipList.h
folly/Conv.cpp
folly/Exception.h
folly/FBVector.h
folly/Format-inl.h
folly/Format.cpp
folly/GroupVarint.h
folly/IPAddress.cpp
folly/IPAddressV6.cpp
folly/IndexedMemPool.h
folly/MPMCPipeline.h
folly/MPMCQueue.h
folly/Math.h
folly/MemoryMapping.cpp
folly/Padded.h
folly/PicoSpinLock.h
folly/Range.h
folly/SocketAddress.cpp
folly/SocketAddress.h
folly/String-inl.h
folly/String.cpp
folly/ThreadCachedInt.h
folly/Varint.h
folly/build/GenerateFingerprintTables.cpp
folly/detail/CacheLocality.cpp
folly/detail/FingerprintPolynomial.h
folly/detail/IPAddressSource.h
folly/detail/RangeSse42.cpp
folly/dynamic.cpp
folly/experimental/AsymmetricMemoryBarrier.cpp
folly/experimental/BitVectorCoding.h
folly/experimental/Bits.h
folly/experimental/EliasFanoCoding.h
folly/experimental/Instructions.h
folly/experimental/JSONSchema.cpp
folly/experimental/TestUtil.cpp
folly/experimental/bser/Dump.cpp
folly/experimental/bser/Load.cpp
folly/experimental/io/HugePages.cpp
folly/fibers/GuardPageAllocator.cpp
folly/fibers/WhenN-inl.h
folly/futures/Future-inl.h
folly/gen/Parallel-inl.h
folly/io/IOBuf.cpp
folly/io/RecordIO.cpp
folly/io/ShutdownSocketSet.cpp
folly/io/async/AsyncPipe.cpp
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncUDPSocket.cpp
folly/io/async/EventBase.cpp
folly/io/async/EventHandler.cpp
folly/io/async/SSLContext.cpp
folly/io/async/test/AsyncSSLSocketWriteTest.cpp
folly/io/test/IOBufCursorTest.cpp
folly/json.cpp
folly/portability/Constexpr.h
folly/portability/Fcntl.cpp
folly/portability/Sockets.cpp
folly/portability/SysFile.cpp
folly/portability/Time.cpp
folly/portability/Unistd.cpp
folly/ssl/OpenSSLHash.h
folly/ssl/detail/SSLSessionImpl.cpp
folly/ssl/test/OpenSSLHashTest.cpp
folly/stats/BucketedTimeSeries-defs.h
folly/stats/BucketedTimeSeries.h
folly/stats/Histogram.h
folly/stats/MultiLevelTimeSeries-defs.h
folly/test/IndexedMemPoolTest.cpp
folly/test/MathTest.cpp