File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
test/sanitizer_suppressions Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
209
209
abort ();
210
210
211
211
// Use the biggest type possible to hold the range and the result.
212
- uint64_t range = static_cast <uint64_t >(max) - min;
212
+ uint64_t range = static_cast <uint64_t >(max) - static_cast < uint64_t >( min) ;
213
213
uint64_t result = 0 ;
214
214
size_t offset = 0 ;
215
215
@@ -230,7 +230,7 @@ T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
230
230
if (range != std::numeric_limits<decltype (range)>::max ())
231
231
result = result % (range + 1 );
232
232
233
- return static_cast <T>(min + result);
233
+ return static_cast <T>(static_cast < uint64_t >( min) + result);
234
234
}
235
235
236
236
// Returns a floating point value in the range [Type's lowest, Type's max] by
@@ -390,7 +390,7 @@ TS FuzzedDataProvider::ConvertUnsignedToSigned(TU value) {
390
390
return static_cast <TS>(value);
391
391
} else {
392
392
constexpr auto TS_min = std::numeric_limits<TS>::min ();
393
- return TS_min + static_cast <char >(value - TS_min);
393
+ return TS_min + static_cast <TS >(value - TS_min);
394
394
}
395
395
}
396
396
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ implicit-integer-sign-change:*/include/boost/
20
20
implicit-integer-sign-change:*/include/c++/
21
21
implicit-integer-sign-change:*/new_allocator.h
22
22
implicit-integer-sign-change:crc32c/
23
- # implicit-integer-sign-change in FuzzedDataProvider's ConsumeIntegralInRange
24
- implicit-integer-sign-change:FuzzedDataProvider.h
25
23
implicit-integer-sign-change:minisketch/
26
24
implicit-signed-integer-truncation:*/include/c++/
27
25
implicit-signed-integer-truncation:leveldb/
You can’t perform that action at this time.
0 commit comments