diff options
| author | hathach <[email protected]> | 2023-07-03 13:09:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-07-03 13:09:43 +0700 |
| commit | 04b1a67898cbd32f09cf7ef5384b780afee30e8c (patch) | |
| tree | 5f7ee88c2de9b5a8310fe8eb8060efc1e99b4f66 /src/device/usbd.c | |
| parent | 2b735ee8f5476168d6b5ed1dc32edc52f4d3648a (diff) | |
| parent | f1e006d09bd32088ab421d0b519eb89c531eda4e (diff) | |
Merge branch 'master' into renesas_ra_hs_rebased
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; } |
