Prevent warnings about some unused parameters in pico_stdio_usb when building with -Wextra (#431)
* Fix warnings about some unused parameters in pico_stdio_usb * Use `__unused` for the unused parameter in tud_descriptor_configuration_cb * Remove redundant inclusions of `pico/platform.h` This header is included by the other library headers (via `pico.h`)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							80356a4f02
						
					
				
				
					commit
					048fcdefd6
				
			| @ -100,7 +100,7 @@ usbd_class_driver_t const *usbd_app_driver_get_cb(uint8_t *driver_count) { | |||||||
|  |  | ||||||
| #if PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE | #if PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE | ||||||
| // Support for default BOOTSEL reset by changing baud rate | // Support for default BOOTSEL reset by changing baud rate | ||||||
| void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* p_line_coding) { | void tud_cdc_line_coding_cb(__unused uint8_t itf, cdc_line_coding_t const* p_line_coding) { | ||||||
|     if (p_line_coding->bit_rate == PICO_STDIO_USB_RESET_MAGIC_BAUD_RATE) { |     if (p_line_coding->bit_rate == PICO_STDIO_USB_RESET_MAGIC_BAUD_RATE) { | ||||||
| #ifdef PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED | #ifdef PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED | ||||||
|         const uint gpio_mask = 1u << PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED; |         const uint gpio_mask = 1u << PICO_STDIO_USB_RESET_BOOTSEL_ACTIVITY_LED; | ||||||
|  | |||||||
| @ -115,12 +115,11 @@ const uint8_t *tud_descriptor_device_cb(void) { | |||||||
|     return (const uint8_t *)&usbd_desc_device; |     return (const uint8_t *)&usbd_desc_device; | ||||||
| } | } | ||||||
|  |  | ||||||
| const uint8_t *tud_descriptor_configuration_cb(uint8_t index) { | const uint8_t *tud_descriptor_configuration_cb(__unused uint8_t index) { | ||||||
|     (void)index; |  | ||||||
|     return usbd_desc_cfg; |     return usbd_desc_cfg; | ||||||
| } | } | ||||||
|  |  | ||||||
| const uint16_t *tud_descriptor_string_cb(uint8_t index, uint16_t langid) { | const uint16_t *tud_descriptor_string_cb(uint8_t index, __unused uint16_t langid) { | ||||||
|     #define DESC_STR_MAX (20) |     #define DESC_STR_MAX (20) | ||||||
|     static uint16_t desc_str[DESC_STR_MAX]; |     static uint16_t desc_str[DESC_STR_MAX]; | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user