mirror of https://github.com/google/snappy.git
Pass by reference the first argument of ExtractLowBytes
to avoid UB of passing uninitialized argument by value. PiperOrigin-RevId: 406052814
This commit is contained in:
parent
fe18b46322
commit
65dc7b3839
|
@ -954,7 +954,7 @@ static inline void Report(const char *algorithm, size_t compressed_size,
|
|||
// bool TryFastAppend(const char* ip, size_t available, size_t length, T* op);
|
||||
// };
|
||||
|
||||
static inline uint32_t ExtractLowBytes(uint32_t v, int n) {
|
||||
static inline uint32_t ExtractLowBytes(const uint32_t& v, int n) {
|
||||
assert(n >= 0);
|
||||
assert(n <= 4);
|
||||
#if SNAPPY_HAVE_BMI2
|
||||
|
|
Loading…
Reference in New Issue