Enable -Wconversion
(#1359)
Summary: X-link: https://github.com/facebook/react-native/pull/39291 Pull Request resolved: https://github.com/facebook/yoga/pull/1359 This enables clang warnings around potentially unsafe conversions, such as those with mismatched signedness, or ones which may lead to truncation. This should catch issues in local development which create errors for MSVC (e.g. Dash), who's default `/W3` includes warnings akin to `-Wshorten-64-to-32`. This full set of warnings here is a tad spammy, but probably more useful than not. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D48954777 fbshipit-source-id: 1ccc07b99d09d1c2d428158149698ffd04025605
This commit is contained in:
committed by
Facebook GitHub Bot
parent
95a7b4497e
commit
aee43a53bc
@@ -55,7 +55,8 @@ static void __printBenchmarkResult(
|
||||
double mean = 0;
|
||||
clock_t lastEnd = start;
|
||||
for (uint32_t i = 0; i < NUM_REPETITIONS; i++) {
|
||||
timesInMs[i] = (endTimes[i] - lastEnd) / (double) CLOCKS_PER_SEC * 1000;
|
||||
timesInMs[i] =
|
||||
((double) (endTimes[i] - lastEnd)) / (double) CLOCKS_PER_SEC * 1000;
|
||||
lastEnd = endTimes[i];
|
||||
mean += timesInMs[i];
|
||||
}
|
||||
|
Reference in New Issue
Block a user