mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-18 17:42:36 -05:00
Fix undefined behavior that blocks compiling with UBSan
Left shifts are not defined in C if they would cause signed overflow, so these expressions get instrumented, which makes them unusable as switch values and triggers compile errors when compiling with UBSan. Change-Id: I0588d4be1e00ba1cfde0eac119ead368b20d10c9
This commit is contained in:
parent
c6df8cc4f7
commit
fca7b8e2ff
2 changed files with 3 additions and 2 deletions
|
|
@ -30,7 +30,8 @@
|
|||
#define TAG_NAME_LENGTH 32
|
||||
#define TAG_VALUE_LENGTH 128
|
||||
|
||||
#define FOURCC(a,b,c,d) (((a)<<24) | ((b) << 16) | ((c) << 8) | (d))
|
||||
#define FOURCC(a,b,c,d) ((((unsigned long)(a)) << 24) | (((unsigned long)(b)) << 16) | \
|
||||
(((unsigned long)(c)) << 8) | ((unsigned long)(d)))
|
||||
|
||||
enum tagtype { TAGTYPE_APE = 1, TAGTYPE_VORBIS };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue