From 159b88c871e4b833af94f6c002b50a6174837b63 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 28 Aug 2018 06:41:57 -0600 Subject: [PATCH] include/limits.h and include/sys/types.h: Fix warning about 'SIZE_MAX' redefined. include/nuttx/usb/audio.h: Fix warnings due to '-' used whete '_' intended. --- include/limits.h | 1 + include/nuttx/usb/audio.h | 18 +++++++++--------- include/stdint.h | 12 ------------ 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/include/limits.h b/include/limits.h index bc04dcfd5d..6f8a6d7749 100644 --- a/include/limits.h +++ b/include/limits.h @@ -213,6 +213,7 @@ #define PIPE_BUF _POSIX_PIPE_BUF #define SIZE_MAX _POSIX_SIZE_MAX #define SIZE_MIN _POSIX_SIZE_MIN +#define RSIZE_MAX _POSIX_SIZE_MAX #define SSIZE_MAX _POSIX_SSIZE_MAX #define SSIZE_MIN _POSIX_SSIZE_MIN #define STREAM_MAX _POSIX_STREAM_MAX diff --git a/include/nuttx/usb/audio.h b/include/nuttx/usb/audio.h index ab1bb65282..3c77a85650 100644 --- a/include/nuttx/usb/audio.h +++ b/include/nuttx/usb/audio.h @@ -526,9 +526,9 @@ #define ADC_FORMAT_TYPEIII_IEC61937_MPEG2_AAC_ADTS (1 << 4) #define ADC_FORMAT_TYPEIII_IEC61937_MPEG2_L1_LS (1 << 5) #define ADC_FORMAT_TYPEIII_IEC61937_MPEG2_L2_3_LS (1 << 6) -#define ADC_FORMAT_TYPEIII_IEC61937_DTS-I (1 << 7) -#define ADC_FORMAT_TYPEIII_IEC61937_DTS-II (1 << 8) -#define ADC_FORMAT_TYPEIII_IEC61937_DTS-III (1 << 9) +#define ADC_FORMAT_TYPEIII_IEC61937_DTS_I (1 << 7) +#define ADC_FORMAT_TYPEIII_IEC61937_DTS_II (1 << 8) +#define ADC_FORMAT_TYPEIII_IEC61937_DTS_III (1 << 9) #define ADC_FORMAT_TYPEIII_IEC61937_ATRAC (1 << 10) #define ADC_FORMAT_TYPEIII_IEC61937_ATRAC2_3 (1 << 11) #define ADC_FORMAT_TYPEIII_WMA (1 << 12) @@ -551,9 +551,9 @@ #define ADC_FORMAT_TYPEIV_IEC61937_MPEG2_AAC_ADTS (1 << 12) #define ADC_FORMAT_TYPEIV_IEC61937_MPEG2_L1_LS (1 << 13) #define ADC_FORMAT_TYPEIV_IEC61937_MPEG2_L2_3_LS (1 << 14) -#define ADC_FORMAT_TYPEIV_IEC61937_DTS-I (1 << 15) -#define ADC_FORMAT_TYPEIV_IEC61937_DTS-II (1 << 16) -#define ADC_FORMAT_TYPEIV_IEC61937_DTS-III (1 << 17) +#define ADC_FORMAT_TYPEIV_IEC61937_DTS_I (1 << 15) +#define ADC_FORMAT_TYPEIV_IEC61937_DTS_II (1 << 16) +#define ADC_FORMAT_TYPEIV_IEC61937_DTS_III (1 << 17) #define ADC_FORMAT_TYPEIV_IEC61937_ATRAC (1 << 18) #define ADC_FORMAT_TYPEIV_IEC61937_ATRAC2_3 (1 << 19) #define ADC_FORMAT_TYPEIV_TYPE_III_WMA (1 << 20) @@ -802,7 +802,7 @@ struct adc_mixerunit_desc_s #define mu_controls(p) mu_variable[(p)->mu_npins+1] #define mu_mixer(p) mu_variable[(p)->mu_npins+2] -#define USB_SIZEOF_ADC_CLKSEL_DESC(npins,nchan) (13+(npins)+(nchan)) +#define USB_SIZEOF_ADC_MIXERUNIT_DESC(npins,nchan) (13+(npins)+(nchan)) /* Selector Unit Descriptor */ @@ -1067,7 +1067,7 @@ struct adc_stextunit_desc_s uint8_t st_processing; /* 16: String index to name of processing unit */ }; -#define USB_SIZEOF_ADC_DOLBYUNIT_DESC(nmodes) (17) +#define USB_SIZEOF_ADC_STEXTUNIT_DESC(nmodes) (17) /* Extension Unit Descriptor */ @@ -1418,7 +1418,7 @@ struct adc_equalizer_curparm_s uint8_t eq_cur[1]; /* 4: Setting for the band in bands bitset */ }; -#define USB_SIZEOF_ADC_CONNCTRL_CURPARM(nbands) (4+(nbands)) +#define USB_SIZEOF_ADC_EQUALIZER_CURPARM(nbands) (4+(nbands)) /* Graphic Equalizer Control RANGE Parameter Block */ diff --git a/include/stdint.h b/include/stdint.h index 41cca77b79..9914ae094a 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -184,18 +184,6 @@ # define PTRDIFF_MAX #endif -#ifdef CONFIG_SMALL_MEMORY - -#define SIZE_MAX UINT16_MAX /* See sys/types.h */ -#define RSIZE_MAX UINT16_MAX - -#else /* CONFIG_SMALL_MEMORY */ - -#define SIZE_MAX UINT32_MAX /* See sys/types.h */ -#define RSIZE_MAX UINT32_MAX - -#endif /* CONFIG_SMALL_MEMORY */ - #if 0 # define WCHAR_MIN # define WCHAR_MAX