diff --git a/firmware/kernel/include/queue.h b/firmware/kernel/include/queue.h index 6740b88760..a9c3b5a93a 100644 --- a/firmware/kernel/include/queue.h +++ b/firmware/kernel/include/queue.h @@ -38,7 +38,7 @@ /* make sure SYS_EVENT_CLS_BITS has enough range */ /* Bit 31->|S|c...c|i...i| */ -#define SYS_EVENT ((long)(int)(1 << 31)) +#define SYS_EVENT ((long)(int)(1u << 31)) #define SYS_EVENT_CLS_BITS (3) #define SYS_EVENT_CLS_SHIFT (31-SYS_EVENT_CLS_BITS) #define SYS_EVENT_CLS_MASK (((1l << SYS_EVENT_CLS_BITS)-1) << SYS_EVENT_SHIFT) diff --git a/lib/rbcodec/metadata/metadata_common.h b/lib/rbcodec/metadata/metadata_common.h index 14115b745a..0f6fcb279c 100644 --- a/lib/rbcodec/metadata/metadata_common.h +++ b/lib/rbcodec/metadata/metadata_common.h @@ -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 };