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

Add a prefix to DEPRECATED to avoid conflit with newer esp32 arduino cores #40

Closed

Conversation

PBrunot
Copy link

@PBrunot PBrunot commented May 30, 2024

Q A
Bug fix? yes
New feature? no
Doc update? no
BC breaks? no
Deprecations? no
Fixed tickets #...

To avoid collision with esp32 / binary.h file DEPRECATED and compiler warnings I suggest adding a prefix MRFC_ to the define in this project.

See : https://github.com/espressif/arduino-esp32/blob/c16a325439fe5a8a3160701d9601634155bb1443/cores/esp32/binary.h#L28

Example warning with GCC 12:

In file included from C:/Users/pasca/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:41,
                 from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.h:18,
                 from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.cpp:2:
C:/Users/pasca/.platformio/packages/framework-arduinoespressif32/cores/esp32/binary.h:28: warning: "DEPRECATED" redefined
   28 | #define DEPRECATED(x) [[deprecated("use " #x " instead")]]
      |
In file included from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.h:13: .pio/libdeps/wokwi/RFID_MFRC522v2/src/deprecated.h:12: note: this is the location of the previous definition
   12 | #define DEPRECATED [[deprecated]]
      |

@Rotzbua
Copy link
Contributor

Rotzbua commented Jun 6, 2024

Thanks for the hint. I have not tested arduino-esp v3 yet. Added to my todo.

@Rotzbua Rotzbua self-assigned this Jun 9, 2024
…o cores.

To avoid collision with esp32 / binary.h file DEPRECATED and compiler warnings I suggest adding a prefix MRFC_ to the define in this project.

Example warning with GCC 12:
In file included from C:/Users/pasca/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:41,
                 from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.h:18,
                 from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.cpp:2:
C:/Users/pasca/.platformio/packages/framework-arduinoespressif32/cores/esp32/binary.h:28: warning: "DEPRECATED" redefined
   28 | #define DEPRECATED(x) [[deprecated("use " #x " instead")]]
      |
In file included from .pio/libdeps/wokwi/RFID_MFRC522v2/src/MFRC522v2.h:13:
.pio/libdeps/wokwi/RFID_MFRC522v2/src/deprecated.h:12: note: this is the location of the previous definition
   12 | #define DEPRECATED [[deprecated]]
      |
@Rotzbua Rotzbua force-pushed the fix-warning-redefine-deprecated branch from 409555d to 08739d7 Compare June 23, 2024 19:21
@Rotzbua
Copy link
Contributor

Rotzbua commented Aug 8, 2024

@PBrunot thanks. fixed by 5b5f5b7

@Rotzbua Rotzbua closed this Aug 8, 2024
@PBrunot PBrunot deleted the fix-warning-redefine-deprecated branch August 8, 2024 18:55
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.

2 participants