Skip to content

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

Closed
@tbnobody

Description

@tbnobody

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions