diff options
| author | Ha Thach <[email protected]> | 2023-06-12 23:14:48 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-12 23:14:48 +0700 |
| commit | bbc76e77779a88fddcfc4d38a406edff2b4d09fb (patch) | |
| tree | 8384cc562433893165ef8d2c403f3b8d22aa7e65 /src/device/usbd.c | |
| parent | 39a64334aaf815b1b01e246680dd1e2d21f9fd18 (diff) | |
| parent | 41801c2a6bd146033f5ff00e54983de46ab414b9 (diff) | |
Merge pull request #2104 from hathach/g4-pd
Initial support for USB PD stack
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; } |
