Skip to content

Commit bee96c4

Browse files
authored
Merge pull request #206 from henrygab/fix_compile_warnings
Fix compile warnings
2 parents 330cb4e + 8afd052 commit bee96c4

File tree

26 files changed

+122
-25
lines changed

26 files changed

+122
-25
lines changed

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21e18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21g18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/mzero/Bootloader_D21/src/ASF/sam0/utils/cmsis/samd21/include/samd21j18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21e15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21e16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21e17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21e18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ void I2S_Handler ( void );
218218
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
219219
*/
220220

221-
#define LITTLE_ENDIAN 1
221+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
222+
#error "Little Endian is already defined, but to different value than expected?!"
223+
#else
224+
#define LITTLE_ENDIAN 1
225+
#endif
222226
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
223227
#define __MPU_PRESENT 0 /*!< MPU present or not */
224228
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21g15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21g16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21g17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21g18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ void I2S_Handler ( void );
222222
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
223223
*/
224224

225-
#define LITTLE_ENDIAN 1
225+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
226+
#error "Little Endian is already defined, but to different value than expected?!"
227+
#else
228+
#define LITTLE_ENDIAN 1
229+
#endif
226230
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
227231
#define __MPU_PRESENT 0 /*!< MPU present or not */
228232
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21j15a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21j16a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21j17a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

bootloaders/sofia/Bootloader_D21_Sofia_V2.1/src/ASF/sam0/utils/cmsis/samd21/include/samd21j18a.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ void I2S_Handler ( void );
226226
* \brief Configuration of the Cortex-M0+ Processor and Core Peripherals
227227
*/
228228

229-
#define LITTLE_ENDIAN 1
229+
#if defined(LITTLE_ENDIAN) && (LITTLE_ENDIAN != 1)
230+
#error "Little Endian is already defined, but to different value than expected?!"
231+
#else
232+
#define LITTLE_ENDIAN 1
233+
#endif
230234
#define __CM0PLUS_REV 1 /*!< Core revision r0p1 */
231235
#define __MPU_PRESENT 0 /*!< MPU present or not */
232236
#define __NVIC_PRIO_BITS 2 /*!< Number of bits used for Priority Levels */

cores/arduino/SERCOM.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class SERCOM
245245
uint32_t getFreqRef(void) { return freqRef; };
246246
#else
247247
// The equivalent SAMD21 dummy functions...
248-
void setClockSource(int8_t idx, SercomClockSource src, bool core) { };
248+
void setClockSource(__attribute__((unused)) int8_t idx, __attribute__((unused)) SercomClockSource src, __attribute__((unused)) bool core) { };
249249
SercomClockSource getClockSource(void) { return SERCOM_CLOCK_SOURCE_FCPU; };
250250
uint32_t getFreqRef(void) { return F_CPU; };
251251
#endif

cores/arduino/USB/USBCore.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ bool USBDeviceClass::handleStandardSetup(USBSetup &setup)
877877
sendZlp(0);
878878
return true;
879879
}
880+
return false;
880881

881882
case SET_ADDRESS:
882883
setAddress(setup.wValueL);

0 commit comments

Comments
 (0)