Skip to content

Conversation

@vikramdattu
Copy link
Contributor

@vikramdattu vikramdattu commented Nov 13, 2025

Description

Fix mdns.c dcst variable not used warning for ESP32-P4 and other non-native Wi-Fi devices

  • Cover WIFI_REMOTE as well for MDNS_ESP_WIFI_ENABLED macro
  • localize esp_netif_dhcp_status_t dcst; declaration where used
  • Bumped patch version for mdns component

Testing

Tried with ESP RainMaker example on ESP32-P4

  • Build warning is not seen anymore and the device is discoverable

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Note

Expand MDNS_ESP_WIFI_ENABLED to cover CONFIG_ESP_WIFI_REMOTE_ENABLED and move dcst declarations into specific Wi‑Fi/Ethernet event branches to fix unused-variable warnings.

  • mDNS core (components/mdns/mdns.c):
    • Update macro: MDNS_ESP_WIFI_ENABLED now checks (CONFIG_ESP_WIFI_ENABLED || CONFIG_ESP_WIFI_REMOTE_ENABLED).
    • Event handling:
      • WIFI events: declare esp_netif_dhcp_status_t dcst inside WIFI_EVENT branch.
      • ETH events: declare esp_netif_dhcp_status_t dcst inside ETH_EVENT branch.
    • Minor preprocessor/indentation adjustments around event handlers.

Written by Cursor Bugbot for commit 081eef8. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link

CLAassistant commented Nov 13, 2025

CLA assistant check
All committers have signed the CLA.

@vikramdattu
Copy link
Contributor Author

cc @david-cermak

@github-actions github-actions bot changed the title fix(mdns): Fix unused variable dcst warning for wifi-remote chips fix(mdns): Fix unused variable dcst warning for wifi-remote chips (IDFGH-16787) Nov 13, 2025
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 13, 2025
Copy link
Collaborator

@david-cermak david-cermak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some formal issue with our release process.

If you prefer, just remove the change in idf_component.yml and we can merge it immediately. I'll then handle the release process.

 - Cover WIFI_REMOTE as well for MDNS_ESP_WIFI_ENABLED macro
 - localize `esp_netif_dhcp_status_t dcst;` declaration where used
Copy link
Collaborator

@david-cermak david-cermak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

There's a minor formatting issue (and fuzzer docker image issue), but since I'm tagging the version afterwards, I'll fix all that in #944.

Thank you @vikramdattu for the fix!

@david-cermak david-cermak merged commit 1444d57 into espressif:master Nov 14, 2025
148 of 151 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants