summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-28 00:38:34 +0700
committerhathach <[email protected]>2025-10-28 11:10:29 +0700
commit113a763bc3fe861ac7c20075b2ad29bb51f6fd01 (patch)
treeaaab97d17689aff79b6b4b0ae2794464701313b3 /src
parenta12806a6cd65b11476cde69628f92f64978f1c64 (diff)
fix warning with strict prototypes warnings
Diffstat (limited to 'src')
-rw-r--r--src/portable/nuvoton/nuc121/dcd_nuc121.c10
-rw-r--r--src/portable/nuvoton/nuc505/dcd_nuc505.c10
2 files changed, 20 insertions, 0 deletions
diff --git a/src/portable/nuvoton/nuc121/dcd_nuc121.c b/src/portable/nuvoton/nuc121/dcd_nuc121.c
index 37210ea34..804a35565 100644
--- a/src/portable/nuvoton/nuc121/dcd_nuc121.c
+++ b/src/portable/nuvoton/nuc121/dcd_nuc121.c
@@ -38,8 +38,18 @@
#if CFG_TUD_ENABLED && ( (CFG_TUSB_MCU == OPT_MCU_NUC121) || (CFG_TUSB_MCU == OPT_MCU_NUC126) )
#include "device/dcd.h"
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
#include "NuMicro.h"
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
// Since TinyUSB doesn't use SOF for now, and this interrupt too often (1ms interval)
// We disable SOF for now until needed later on
#ifndef USE_SOF
diff --git a/src/portable/nuvoton/nuc505/dcd_nuc505.c b/src/portable/nuvoton/nuc505/dcd_nuc505.c
index fa457d861..6195015ae 100644
--- a/src/portable/nuvoton/nuc505/dcd_nuc505.c
+++ b/src/portable/nuvoton/nuc505/dcd_nuc505.c
@@ -38,8 +38,18 @@
#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_NUC505)
#include "device/dcd.h"
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
#include "NUC505Series.h"
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
/*
* The DMA functionality of the USBD peripheral does not appear to succeed with
* transfer lengths that are longer (> 64 bytes) and are not a multiple of 4.