Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Use an unnamed variable instead of a named one"
Fixes failures in the test suite when building in C++ mode. This reverts commit fa4e7e9. In file included from header_checker.cpp:6: ../include/usbg/function/net.h: In function ‘int usbg_f_net_get_dev_addr(usbg_f_net*, ether_addr*)’: ../include/usbg/usbg.h:61:16: error: taking address of rvalue [-fpermissive] 61 | ((union UNAME){ .FIELD = WHAT, }) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ ../include/usbg/function/net.h:51:2: note: in expansion of macro ‘USBG_TO_UNION’ 51 | USBG_TO_UNION(usbg_f_net_attr_val, dev_addr, WHAT) | ^~~~~~~~~~~~~ ../include/usbg/function/net.h:131:12: note: in expansion of macro ‘USBG_F_NET_ETHER_ADDR_TO_ATTR_VAL’ 131 | &USBG_F_NET_ETHER_ADDR_TO_ATTR_VAL(*addr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/usbg/function/net.h: In function ‘int usbg_f_net_get_host_addr(usbg_f_net*, ether_addr*)’: ../include/usbg/usbg.h:61:16: error: taking address of rvalue [-fpermissive] 61 | ((union UNAME){ .FIELD = WHAT, }) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ ../include/usbg/function/net.h:51:2: note: in expansion of macro ‘USBG_TO_UNION’ 51 | USBG_TO_UNION(usbg_f_net_attr_val, dev_addr, WHAT) | ^~~~~~~~~~~~~ ../include/usbg/function/net.h:157:12: note: in expansion of macro ‘USBG_F_NET_ETHER_ADDR_TO_ATTR_VAL’ 157 | &USBG_F_NET_ETHER_ADDR_TO_ATTR_VAL(*addr)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Loading branch information