SeeedJP / wio_cellular

https://seeedjp.github.io/wio_cellular/
Other
1 stars 3 forks source link

コンパイルでwarningが発生している #14

Closed matsujirushi closed 3 days ago

matsujirushi commented 2 weeks ago

soracom-gps-tracker

  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:31:5: warning: 'used' attribute ignored [-Wattributes]
     31 |     extern uint8_t __STACK[] __STACK_ATTRIBUTES(__STACK_ALIGNMENT);
        |     ^~~~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:38:5: warning: 'used' attribute ignored [-Wattributes]
     38 |     extern uint8_t __HEAP[] __HEAP_ATTRIBUTES(__HEAP_ALIGNMENT);
        |     ^~~~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:55:1: warning: 'used' attribute ignored [-Wattributes]
     55 | __VECTOR_TABLE_ATTRIBUTE extern const VECTOR_TABLE_Type __VECTOR_TABLE[];
        | ^~~~~~~~~~~~~~~~~~~~~~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/haly/nrfy_spim.h:838:16: warning: unused variable 'size' [-Wunused-variable]
    838 |         size_t size = stop ? nrf_spim_rx_amount_get(p_reg) : p_xfer->rx_length;
        |                ^~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/haly/nrfy_spim.h:846:16: warning: unused variable 'size' [-Wunused-variable]
    846 |         size_t size = stop ? nrf_spim_rx_amount_get(p_reg) : p_xfer->rx_length;
        |                ^~~~

flash

  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/Print.h:49:20: warning: 'virtual size_t Print::write(const uint8_t*, size_t)' was hidden [-Woverloaded-virtual=]
     49 |     virtual size_t write(const uint8_t *buffer, size_t size);
        |                    ^~~~~

soracom-uptime-httpclient

  /home/runner/Arduino/libraries/ArduinoHttpClient/src/utility/URLParser/http_parser.c:514:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
    514 |         found_at = 1;
        |         ~~~~~~~~~^~~
matsujirushi commented 3 days ago

flash

SdFatライブラリのArduinoFiles.h。

C:/Users/takashi/Documents/Arduino/libraries/SdFat/src/common/ArduinoFiles.h: In instantiation of 'class PrintFile<FatFile>':
c:\Users\takashi\Documents\Arduino\libraries\SdFat\src/SdFat.h:469:23:   required from here
C:\Users\takashi\AppData\Local\arduino15\packages\SeeedJP\hardware\nrf52\1.0.3\cores\nRF5/Print.h:49:20: warning: 'virtual size_t Print::write(const uint8_t*, size_t)' was hidden [-Woverloaded-virtual=]
   49 |     virtual size_t write(const uint8_t *buffer, size_t size);
      |                    ^~~~~

これと同じ事象。

https://github.com/earlephilhower/ESP8266SdFat/pull/16

matsujirushi commented 3 days ago

soracom-uptime-httpclient

ArduinoHttpClientライブラリのhttp_parser.c。

  /home/runner/Arduino/libraries/ArduinoHttpClient/src/utility/URLParser/http_parser.c:514:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
    514 |         found_at = 1;
        |         ~~~~~~~~~^~~

フォールスルーは正常。 コードにコメント表記あり。

      case s_req_server_with_at:
        found_at = 1;

      /* FALLTROUGH */

[[fallthrough]];を書けば、warning回避できる。

https://stackoverflow.com/questions/55693007/error-this-statement-may-fall-through-werror-implicit-fallthrough

matsujirushi commented 3 days ago

soracom-gps-tracker

Arduino IDEのときはwarningが発生しない。(GitHub Actionsのときに発生している。)

/home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:31:5: warning: 'used' attribute ignored [-Wattributes]
     31 |     extern uint8_t __STACK[] __STACK_ATTRIBUTES(__STACK_ALIGNMENT);
        |     ^~~~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:38:5: warning: 'used' attribute ignored [-Wattributes]
     38 |     extern uint8_t __HEAP[] __HEAP_ATTRIBUTES(__HEAP_ALIGNMENT);
        |     ^~~~~~
  /home/runner/.arduino15/packages/SeeedJP/hardware/nrf52/1.3.0/cores/nRF5/nordic/nrfx/mdk/startup_nrf_common.c:55:1: warning: 'used' attribute ignored [-Wattributes]
     55 | __VECTOR_TABLE_ATTRIBUTE extern const VECTOR_TABLE_Type __VECTOR_TABLE[];
        | ^~~~~~~~~~~~~~~~~~~~~~~~
matsujirushi commented 3 days ago