Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.0 breaking Clang-based builds #76

Open
3 tasks done
KaeLL opened this issue Sep 19, 2024 · 2 comments
Open
3 tasks done

1.6.0 breaking Clang-based builds #76

KaeLL opened this issue Sep 19, 2024 · 2 comments

Comments

@KaeLL
Copy link

KaeLL commented Sep 19, 2024

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

To build correctly

Actual behavior (suspected bug)

Build breaks

Error logs or terminal output

/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_resolv.c:39:34: error: tentative definition of variable with internal linkage has incomplete non-array type 'struct ble_hs_resolv_data' [-Werror,-Wtentative-definition-incomplete-type]
   39 | static struct ble_hs_resolv_data g_ble_hs_resolv_data;
      |                                  ^
/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_resolv.c:39:15: note: forward declaration of 'struct ble_hs_resolv_data'
   39 | static struct ble_hs_resolv_data g_ble_hs_resolv_data;
      |               ^

/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:483:39: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
  483 |         if (ble_host_rpa_enabled() && !memcmp(evt.local_rpa, ble_hs_conn_null_addr, 6) == 0) {
      |                                       ^                                                ~~
/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:483:39: note: add parentheses after the '!' to evaluate the comparison first
  483 |         if (ble_host_rpa_enabled() && !memcmp(evt.local_rpa, ble_hs_conn_null_addr, 6) == 0) {
      |                                       ^
      |                                        (                                                   )
/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:483:39: note: add parentheses around left hand side expression to silence this warning
  483 |         if (ble_host_rpa_enabled() && !memcmp(evt.local_rpa, ble_hs_conn_null_addr, 6) == 0) {
      |                                       ^
      |                                       (                                               )

Steps to reproduce the behavior

Build a Peripheral example, I guess. Not sure, but shouldn't matter.

Project release version

latest

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Linux

Operating system version

Fedora 40

Shell

Bash

Additional context

No response

@rahult-github
Copy link
Collaborator

Hi @KaeLL ,

Can you please help confirm if attached patch works for you ?
suppress_clang_warning.txt

@KaeLL
Copy link
Author

KaeLL commented Sep 20, 2024

It does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants