Skip to content

Commit

Permalink
audio.h: fix error ISO C restricts enumerator values to range of 'int'
Browse files Browse the repository at this point in the history
fix error

~/dsp/libs/tinyusb/src/class/audio/audio.h:643:53: error: ISO C restricts enumerator values to range of 'int' before C23 [-Werror=pedantic]
  643 |   AUDIO_CHANNEL_CONFIG_RAW_DATA                   = 0x80000000, // TODO
      |                                                     ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.

Closes: hathach#2690
  • Loading branch information
ra1nb0w committed Jun 28, 2024
1 parent 7125ac2 commit 8f9a576
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/class/audio/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ typedef enum
AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT = (uint32_t) (1 << 2),
AUDIO_DATA_FORMAT_TYPE_I_ALAW = (uint32_t) (1 << 3),
AUDIO_DATA_FORMAT_TYPE_I_MULAW = (uint32_t) (1 << 4),
AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x80000000,
AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = (int)(1U << 31U),
} audio_data_format_type_I_t;

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

/// AUDIO Channel Cluster Descriptor (4.1)
Expand Down

0 comments on commit 8f9a576

Please sign in to comment.