Skip to content

Conversation

@shadiramadan
Copy link

@shadiramadan shadiramadan commented Sep 21, 2025

Description

Without the volatile keyword clang complains- volatile ensures this statement is not optimized out. My builds succeed after this change.

Clang error (before volatile keyword)

espressif__esp_hosted/common/utils/esp_hosted_cli.c:203:2: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]
  203 |         *(int *) (0x0) = 0;

Testing

Passing gcc/clang builds.


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.

mantriyogesh and others added 30 commits May 19, 2025 08:42
2. delayed network status notification from slave to host in case of deep sleep
- Refactor LWIP port macros
- Add UDP port configuration
- Fix host power save handling
- Improve SPI buffer management with DMA alignment checks
- Update packet filtering during host sleep mode
- Implement optional workqueue for SPI handling
- Replace semaphore-based approach
- Optimize transaction queuing timing
- Fix checksum calculation
- Improve network queue management
- Add transaction timing measurements
- Optimize SPI handler with CS deassertion semaphore
- Implement better error handling in SPI write/read paths
- Configure high-priority workqueue for improved
	  Fix the memory leak in async path
Fix the unwanted repeatative logs in hosted shell
Fix: Simplify connect_ap handling (removed event group)
…acked' structures in between host and slave

2. Fixed double free for RPC request memory
3. Host SPI: Add Flexibility at host to use Workqueue instead of semaphore solution
4. Slave SPI: Extra Debug logs for SPI
5. Added back esp_reset from host to slave
1. Fix SPI throughput issue when MCU is set in UDP
2. C5 5G header change
3. Clean up of code
- added `print_capabilities()` function to spi
- added extra check for BT over UART in `process_capabilities()`
- Simplified CLI Kconfig options
- Prevent auto-connect with SSID in flash when a new SSID is requested
- Reuse feature_enable_disable sync call to get network split availabilty as response
- User-facing debugs updated depending upon network split
- modified logic used to connect to AP when device is not yet
  provisioned
- modified printout to indicate that we connected with static IP
1. Auto Network Setup - Auto configure network on host bootup
2. Network Split - Allow ESP ans host to run network, with same IP

Also updated main README to let user know scenarios and how to choose
NG/ FG/ MCU solutions
1. Auto Network Setup - Auto configure network on host bootup
2. Network Split - Allow ESP ans host to run network, with same IP

Also updated main README to let user know scenarios and how to choose
NG/ FG/ MCU solutions
feat(auto_ip_restore): 1. redefine hosted task priorities

See merge request app-frameworks/esp_hosted!571
- on ESP-IDF v5.5 and above, use `uhci_ll_rx_set_eof_mode()` instead
  of `uhci_ll_set_eof_mode()`.
bugfix(c3_s3_uart_hci) Fix build error due to change in fn name

See merge request app-frameworks/esp_hosted!574
Shreyas0-7 and others added 26 commits July 31, 2025 15:24
Feat/c5 support idf v5.5

See merge request app-frameworks/esp_hosted!603
fix(esp_hosted_ng): Fix compile errors for ng

See merge request app-frameworks/esp_hosted!606
docs(esp_hosted_ng): Update setup docs for esp_hosted ng

See merge request app-frameworks/esp_hosted!609
fix(docs): Update sdio support for c5

See merge request app-frameworks/esp_hosted!610
fix(esp_hosted_ng): Fix De-assert HS signal on CS

See merge request app-frameworks/esp_hosted!611
Docs/deassert cs spi

See merge request app-frameworks/esp_hosted!612
Without the volatile keyword clang complains- volatile ensures this statement is not optimized out.  My builds succeed after this change.

espressif__esp_hosted/common/utils/esp_hosted_cli.c:203:2: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]
  203 |         *(int *) (0x0) = 0;
Copilot AI review requested due to automatic review settings September 21, 2025 20:01
@CLAassistant
Copy link

CLAassistant commented Sep 21, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a clang compiler warning by adding the volatile keyword to a null pointer dereference in a crash handler function. The change ensures that the intentional crash statement is not optimized away by the compiler.

  • Adds volatile qualifier to the null pointer cast in the crash handler
  • Resolves clang compiler error -Werror,-Wnull-dereference
  • Maintains the intentional crash behavior while satisfying compiler requirements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

Successfully merging this pull request may close these issues.

9 participants