diff options
| author | hathach <[email protected]> | 2022-06-24 19:45:49 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-06-24 19:46:19 +0700 |
| commit | 4f6e770eda9f8c605b238f35def1edaff93a8fb8 (patch) | |
| tree | 65e8c12260d3b04fe01bf933886a05094a9cf81b /examples | |
| parent | 4639cac85cf959c3bfed091c02dce1345f067c7a (diff) | |
add more warning option, also fix -Wconversion with rp2040
-Wuninitialized, -Wunused, -Wredundant-decls
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/cdc_msc/src/usb_descriptors.c | 2 | ||||
| -rw-r--r-- | examples/make.mk | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/device/cdc_msc/src/usb_descriptors.c b/examples/device/cdc_msc/src/usb_descriptors.c index 09894cf1b..6b59ed50f 100644 --- a/examples/device/cdc_msc/src/usb_descriptors.c +++ b/examples/device/cdc_msc/src/usb_descriptors.c @@ -282,7 +282,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid) } // first byte is length (including header), second byte is string type - _desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2); + _desc_str[0] = (uint16_t) ((TUSB_DESC_STRING << 8 ) | (2*chr_count + 2)); return _desc_str; } diff --git a/examples/make.mk b/examples/make.mk index bed46d02b..26065c027 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -108,8 +108,13 @@ CFLAGS += \ -Wcast-align \ -Wcast-function-type \ -Wcast-qual \ - -Wnull-dereference + -Wnull-dereference \ + -Wuninitialized \ + -Wunused \ + -Wredundant-decls +# -Wconversion \ + # Debugging/Optimization ifeq ($(DEBUG), 1) CFLAGS += -Og |
