Hi all
I'm trying to compile the MySensors Gateway on my OrangePi 5.
My configuration:
./configure --my-transport=rf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-rf24-ce-pin=13 --my-rf24-cs-pin=15 --my-rf24-irq-pin=16 --my-mqtt-publish-topic-prefix=[prefix] --my-mqtt-subscribe-topic-prefix=[prefix] --my-mqtt-client-id=[client_id] --my-mqtt-user=[user] --my-mqtt-password=[pwd]
Unfortunately I get compilation warnings and errors when running make:
./hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_registerReceiveCallback(RF24_receiveCallbackType)’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
507 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
507 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
507 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/transport/RF24/driver/RF24.cpp: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
507 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘void CircularBuffer<T>::clear()’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
53 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
53 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
53 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
53 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::empty() const’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
66 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
66 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
66 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
66 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::full() const’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
79 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
79 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
79 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
79 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘uint8_t CircularBuffer<T>::available() const’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
92 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
92 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
92 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
92 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getFront() const’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
106 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
106 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
106 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
106 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::pushFront(T*)’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
123 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
123 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
123 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
123 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getBack() const’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
146 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
146 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
146 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
146 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::popBack()’:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
161 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
161 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
161 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h: At global scope:
./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
| ^~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
| ^~~~~~~~~~~~
./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
161 | MY_CRITICAL_SECTION {
| ^~~~~~~~~~~~~~~~~~~
./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
88 | static __inline__ void __hwLock()
| ^~~~~~~~
make: *** [Makefile:99: build/examples_linux/mysgw.o] Error 1
The cpp / g++ compiler version:
root@DESKTOP-GETBHUS:/mnt/d/temp/MySensors# gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Any idea how to fix this?
Regards, M. Erni