projects
/
platform
/
upstream
/
VK-GL-CTS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7734c4e
)
Suppress GCC 11 conversion warning
author
Mika Väinölä
<mika.vainola@siru.fi>
Tue, 30 Nov 2021 11:13:52 +0000
(13:13 +0200)
committer
Matthew Netsch
<quic_mnetsch@quicinc.com>
Fri, 7 Jan 2022 17:11:04 +0000
(12:11 -0500)
On GCC 11 with UBSan enabled deHalfIsIEEENaN produces warnings due to
right shift promoting the result of an expression to an int, which is
then assigned to a deUint16.
Components: Framework
VK-GL-CTS issue: 3371
Change-Id: I48526b61ead69ee14b3253fa29737499253e62bc
framework/delibs/debase/deFloat16.h
patch
|
blob
|
history
diff --git
a/framework/delibs/debase/deFloat16.h
b/framework/delibs/debase/deFloat16.h
index
c43f92b
..
4b25c84
100644
(file)
--- a/
framework/delibs/debase/deFloat16.h
+++ b/
framework/delibs/debase/deFloat16.h
@@
-75,7
+75,7
@@
static const deFloat16 deFloat16QuietNaN = 0x7e01;
DE_INLINE deBool deHalfIsIEEENaN(deFloat16 x)
{
- deUint16 e = (
x & 0x7c00u) >> 10
;
+ deUint16 e = (
deUint16)((x & 0x7c00u) >> 10)
;
deUint16 m = (x & 0x03ffu);
return e == 0x1f && m != 0;
}