NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Compiler warnings ("defined but not used") in "nimble/host/mesh/src/proxy_srv.c"

Open afpineda opened this issue 6 months ago • 1 comments
trafficstars

Hi.

When compiling with all warnings ON, I get the following warning messages:

/home/runner/Arduino/libraries/NimBLE-Arduino/src/nimble/nimble/host/mesh/src/proxy_srv.c:637:13: warning: 'proxy_ccc_write' defined but not used [-Wunused-function]
  637 | static void proxy_ccc_write(uint16_t conn_handle)
      |             ^~~~~~~~~~~~~~~
/home/runner/Arduino/libraries/NimBLE-Arduino/src/nimble/nimble/host/mesh/src/proxy_srv.c:626:13: warning: 'subnet_evt' defined but not used [-Wunused-function]
  626 | static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
      |             ^~~~~~~~~~
/home/runner/Arduino/libraries/NimBLE-Arduino/src/nimble/nimble/host/mesh/src/proxy_srv.c:331:13: warning: 'proxy_send_beacons' defined but not used [-Wunused-function]
  331 | static void proxy_send_beacons(struct ble_npl_event *work)
      |             ^~~~~~~~~~~~~~~~~~

FQBN: esp32:esp32:esp32 h2zero/NimBLE-Arduino version: 2.3.0

This warning may be a symptom of something worse. Either those functions are certainly not called, either some preprocessor directives are missing.

afpineda avatar May 21 '25 09:05 afpineda

Hello @afpineda, those are safe to ignore, they only occur because the mesh proxy is not enabled so they are not called.

h2zero avatar May 21 '25 13:05 h2zero