Skip to content

Commit 236aa96

Browse files
authored
Merge pull request #2693 from ra1nb0w/enum-int
audio.h: fix error ISO C restricts enumerator values to range of 'int'
2 parents 7125ac2 + 8f9a576 commit 236aa96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/class/audio/audio.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ typedef enum
489489
AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT = (uint32_t) (1 << 2),
490490
AUDIO_DATA_FORMAT_TYPE_I_ALAW = (uint32_t) (1 << 3),
491491
AUDIO_DATA_FORMAT_TYPE_I_MULAW = (uint32_t) (1 << 4),
492-
AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x80000000,
492+
AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = (int)(1U << 31U),
493493
} audio_data_format_type_I_t;
494494

495495
/// All remaining definitions are taken from the descriptor descriptions in the UAC2 main specification
@@ -640,7 +640,7 @@ typedef enum
640640
AUDIO_CHANNEL_CONFIG_BOTTOM_CENTER = 0x01000000,
641641
AUDIO_CHANNEL_CONFIG_BACK_LEFT_OF_CENTER = 0x02000000,
642642
AUDIO_CHANNEL_CONFIG_BACK_RIGHT_OF_CENTER = 0x04000000,
643-
AUDIO_CHANNEL_CONFIG_RAW_DATA = 0x80000000,
643+
AUDIO_CHANNEL_CONFIG_RAW_DATA = (int)(1U << 31U),
644644
} audio_channel_config_t;
645645

646646
/// AUDIO Channel Cluster Descriptor (4.1)

0 commit comments

Comments
 (0)