diff options
| author | hathach <[email protected]> | 2023-06-07 18:57:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-06-07 18:57:48 +0700 |
| commit | 9b7dee563e83a548f0d0fb68dd991a868a6427c9 (patch) | |
| tree | bb3879ea4b24160615d9df177eda266c8a4ccbc6 /src/device | |
| parent | b893f1d5417adf8cf874d6b2e7946582ca37982a (diff) | |
able to response with good crc
Diffstat (limited to 'src/device')
| -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; } |
