Skip to content

Commit c32b09c

Browse files
matsujirushiPillar1989
authored andcommitted
Fix unused warning
1 parent 5f840cd commit c32b09c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cores/arduino/Retarget.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ int _getpid(void) {}
5353
extern int __real__write (int fd, const char *ptr, int len);
5454

5555
int __wrap__write (int fd, const char *ptr, int len) {
56+
(void)fd; // UNUSED
57+
5658
int i;
5759

5860
if (!Serial) {

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) {idx = 0; src = SERCOM_CLOCK_SOURCE_FCPU; core = false; };
248+
void setClockSource(int8_t idx, SercomClockSource src, bool core) { (void)idx; (void)src; (void)core; };
249249
SercomClockSource getClockSource(void) { return SERCOM_CLOCK_SOURCE_FCPU; };
250250
uint32_t getFreqRef(void) { return F_CPU; };
251251
#endif

0 commit comments

Comments
 (0)