Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dziobian:gulgul-ultron:19
nodejs-electron.v3
webgl_image_conversion-Wstrict-aliasing.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File webgl_image_conversion-Wstrict-aliasing.patch of Package nodejs-electron.v3
--- src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc.old 2022-10-20 19:00:30.113415900 +0200 +++ src/third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.cc 2022-10-29 22:19:57.652611900 +0200 @@ -4,6 +4,7 @@ #include "third_party/blink/renderer/platform/graphics/gpu/webgl_image_conversion.h" +#include <cstring> #include <limits> #include <memory> @@ -416,7 +417,8 @@ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13}; uint16_t ConvertFloatToHalfFloat(float f) { - unsigned temp = *(reinterpret_cast<unsigned*>(&f)); + unsigned temp; + std::memcpy(&temp, &f, 4); uint16_t signexp = (temp >> 23) & 0x1ff; return g_base_table[signexp] + ((temp & 0x007fffff) >> g_shift_table[signexp]); @@ -834,7 +836,9 @@ uint32_t temp = g_mantissa_table[g_offset_table[half >> 10] + (half & 0x3ff)] + g_exponent_table[half >> 10]; - return *(reinterpret_cast<float*>(&temp)); + float ret; + std::memcpy(&ret, &temp, 4); + return ret; } /* BEGIN CODE SHARED WITH MOZILLA FIREFOX */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor