diff options
| author | Dave Nadler <[email protected]> | 2023-06-24 11:53:24 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-24 11:53:24 -0400 |
| commit | bd897d9c14b289861150456cb5538aac42ecc69e (patch) | |
| tree | 84c67dee042b7dfadd8fbe0745c5f44f39ee9e2f /src/device/usbd.c | |
| parent | e8b7f21af6e5e994ece7c989202767732f23809e (diff) | |
| parent | 50e61e0e16122a2466536d77b858cb228d60d0c2 (diff) | |
Merge branch 'hathach:master' into master
Diffstat (limited to 'src/device/usbd.c')
| -rw-r--r-- | src/device/usbd.c | 10 |
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; } |
