georgerobotics / cyw43-driver

Other
83 stars 42 forks source link

Code builds with warnings v1.0.3 #115

Closed peterharperuk closed 5 months ago

peterharperuk commented 5 months ago

I'm trying to update the cyw43-driver in pico-sdk. We have a test that everything builds without warnings and errors. There are some new issues in the latest version of the cyw43_driver v1.03.

/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c: In function 'cyw43_check_valid_chipset_firmware':
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c:367:60: error: unused parameter 'self' [-Werror=unused-parameter]
  367 | static int cyw43_check_valid_chipset_firmware(cyw43_int_t *self, size_t len, uintptr_t source) {
      |                                               ~~~~~~~~~~~~~^~~~
In file included from /home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c:40:
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c: In function 'cyw43_ll_sdpcm_poll_device':
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c:1097:25: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
 1097 |             CYW43_DEBUG("SPI invalid bytes pending %u\n", bytes_pending);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
      |                                                           |
      |                                                           uint32_t {aka long unsigned int}
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_config.h:122:34: note: in definition of macro 'CYW43_PRINTF'
  122 | #define CYW43_PRINTF(...) printf(__VA_ARGS__)
      |                                  ^~~~~~~~~~~
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c:1097:13: note: in expansion of macro 'CYW43_DEBUG'
 1097 |             CYW43_DEBUG("SPI invalid bytes pending %u\n", bytes_pending);
      |             ^~~~~~~~~~~
/home/peterh/source/pico/pico-sdk2/lib/cyw43-driver/src/cyw43_ll.c:1097:53: note: format string is defined here
 1097 |             CYW43_DEBUG("SPI invalid bytes pending %u\n", bytes_pending);
      |                                                    ~^
      |                                                     |
      |                                                     unsigned int
      |                                                    %lu
cc1: all warnings being treated as errors