summaryrefslogtreecommitdiff
path: root/src/device/usbd.c
diff options
context:
space:
mode:
authorDave Nadler <[email protected]>2023-06-24 11:53:24 -0400
committerGitHub <[email protected]>2023-06-24 11:53:24 -0400
commitbd897d9c14b289861150456cb5538aac42ecc69e (patch)
tree84c67dee042b7dfadd8fbe0745c5f44f39ee9e2f /src/device/usbd.c
parente8b7f21af6e5e994ece7c989202767732f23809e (diff)
parent50e61e0e16122a2466536d77b858cb228d60d0c2 (diff)
Merge branch 'hathach:master' into master
Diffstat (limited to 'src/device/usbd.c')
-rw-r--r--src/device/usbd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 409a5ec10..44c2530ce 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -252,9 +252,19 @@ static inline usbd_class_driver_t const * get_driver(uint8_t drvid)
drvid -= _app_driver_count;
}
+ // when there is no built-in drivers BUILTIN_DRIVER_COUNT = 0 will cause -Wtype-limits warning
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
// Built-in drivers
if (drvid < BUILTIN_DRIVER_COUNT) return &_usbd_driver[drvid];
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
return NULL;
}