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

Warning: null pointer dereference [-Wnull-dereference] in esp32-hal-uart.c #9634

Closed
1 task done
tbnobody opened this issue May 15, 2024 · 1 comment · Fixed by #9637
Closed
1 task done

Warning: null pointer dereference [-Wnull-dereference] in esp32-hal-uart.c #9634

tbnobody opened this issue May 15, 2024 · 1 comment · Fixed by #9637
Assignees
Milestone

Comments

@tbnobody
Copy link

Board

Irrelevant

Device Description

Irrelevant

Hardware Configuration

Irrelevant

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 10

Flash frequency

Irrelevant

PSRAM enabled

no

Upload speed

Irrelevant

Description

When compiling the latest master I get the following warning message:

In file included from C:/Users/username/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:80,
                 from C:/Users/username/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:15:
C:/Users/username/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c: In function 'uartBegin':
C:/Users/username/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:460:51: warning: null pointer dereference [-Wnull-dereference]
         log_e("UART%d initialization error.", uart->num);

Due to the fact that I am using PlatformIO-Arduino 6.7.0 the line numbers are slightly different to the current master. The location in the current master is here:

uart = NULL;
log_e("UART%d initialization error.", uart->num);

Sketch

.

Debug Message

.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@SuGlider
Copy link
Collaborator

Thanks @tbnobody for catching this error!
PR is on the go.

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

Successfully merging a pull request may close this issue.

2 participants