mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-11 02:20:33 +02:00
add WebPInt32ToMem
and use it in calls containing _mm_cvtsi32_si128; this calls WebPUint32ToMem, but corrects the type to avoid runtime warnings with clang -fsanitize=integer of the form: implicit conversion from type 'int' of value -1904123502 (32-bit, signed) to type 'uint32_t' (aka 'unsigned int') changed the value to 2390843794 (32-bit, unsigned) Bug: b/229626362 Change-Id: I20545e822d8045fa44f688241879206055a0a148
This commit is contained in:
@ -82,6 +82,10 @@ static WEBP_INLINE void WebPUint32ToMem(uint8_t* const ptr, uint32_t val) {
|
||||
memcpy(ptr, &val, sizeof(val));
|
||||
}
|
||||
|
||||
static WEBP_INLINE void WebPInt32ToMem(uint8_t* const ptr, int val) {
|
||||
WebPUint32ToMem(ptr, (uint32_t)val);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Reading/writing data.
|
||||
|
||||
|
Reference in New Issue
Block a user