From b271f956c2b1b429ae403a94f8a80d2a7b8d7a75 Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Thu, 9 Aug 2018 19:37:47 -0700 Subject: [PATCH] Fix a TSAN failure (#4250) Summary: TSAN fails due to comparison between signed int and unsigned long. Fix it by static_casting. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4250 Differential Revision: D9256535 Pulled By: riversand963 fbshipit-source-id: c6bad23ff70c6d0ec58e2e85c401ce0ad45de609 --- tools/sst_dump_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sst_dump_test.cc b/tools/sst_dump_test.cc index 88e6260e6..17b59fd77 100644 --- a/tools/sst_dump_test.cc +++ b/tools/sst_dump_test.cc @@ -110,7 +110,7 @@ public: template void PopulateCommandArgs(const std::string& file_path, const char* command, char* (&usage)[N]) const { - for (int i = 0; i < N; ++i) { + for (int i = 0; i < static_cast(N); ++i) { usage[i] = new char[optLength]; } snprintf(usage[0], optLength, "./sst_dump");