PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

unexpected warning while compiling for ESP32 S3 #138

Open Pepito-design opened 2 months ago

Pepito-design commented 2 months ago

Description

unexpected compiler warning ( up to now it works fine )

Steps To Reproduce Problem

compile and link in VSE-PlatformIO-Arduino environment for ESP32 S3

Hardware & Software

esp32-s3-devkitc-1

Arduino Sketch

// Change the code below by your sketch (please try to give the smallest code which demonstrates the problem)
#include <Arduino.h>

// libraries: give links/details so anyone can compile your code for the same result

void setup() {
}

void loop() {
}

.pio/libdeps/esp32-s3-devkitc-1/OneWire/OneWire.cpp line 599

// undef defines for no particular reason

ifdef ARDUINO_ARCH_ESP32

undef noInterrupts() {portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;portENTER_CRITICAL(&mux)

undef interrupts() portEXIT_CRITICAL(&mux);}

endif

// for info on this, search "IRAM_ATTR" at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/general-notes.html

Errors or Incorrect Output

.pio/libdeps/esp32-s3-devkitc-1/OneWire/OneWire.cpp:599:22: warning: extra tokens at end of #undef directive

undef noInterrupts() {portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;portENTER_CRITICAL(&mux)

                  ^

.pio/libdeps/esp32-s3-devkitc-1/OneWire/OneWire.cpp:600:20: warning: extra tokens at end of #undef directive

undef interrupts() portEXIT_CRITICAL(&mux);}

                ^