diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-07-19 10:03:17 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-07-19 15:00:08 +0000 |
commit | 7d5ff0b74b29dac8c413b5707e18453876b608cd (patch) | |
tree | 7388814dfbcf555a49681d8fc620e005a691b5b6 /config.tests | |
parent | 497a3c7ddadf5776b76e5369d2e452966c2bad15 (diff) |
Make bluez compile test pass again
The compiler error is:
In file included from main.cpp:29:0:
main.cpp: In function 'int main()'
main.cpp:33:11: error: taking address of temporary [-fpermissive]
bacmp(BDADDR_ANY, BDADDR_NONE);
^
main.cpp:33:23: error: 'BDADDR_NONE' was not declared in this scope
bacmp(BDADDR_ANY, BDADDR_NONE);
BDADDR_NONE only exists in Linux iBluetooth kernel headers but not in the
Bluez project headers. Furthermore the usage of the BDADDR_* defines
is known to trigger -fpermissive violations. For the prupose of this test
fpermissive is not relevant as the test is never executed and the focus
is in checking the existence of the very same defines.
Change-Id: I56db5406ec91fdd5e7998cac4900ee9f9b628c00
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Diffstat (limited to 'config.tests')
-rw-r--r-- | config.tests/bluez/bluez.pro | 4 | ||||
-rw-r--r-- | config.tests/bluez/main.cpp | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/config.tests/bluez/bluez.pro b/config.tests/bluez/bluez.pro index 28dcadcb..8bbff78a 100644 --- a/config.tests/bluez/bluez.pro +++ b/config.tests/bluez/bluez.pro @@ -1 +1,5 @@ SOURCES += main.cpp + +# test checks existence of certain bluez defines whose +# usage is known to violate the permissive test +QMAKE_CXXFLAGS += -fpermissive diff --git a/config.tests/bluez/main.cpp b/config.tests/bluez/main.cpp index bfc2a0c5..3fe5ee09 100644 --- a/config.tests/bluez/main.cpp +++ b/config.tests/bluez/main.cpp @@ -30,6 +30,11 @@ int main() { +#ifdef BDADDR_NONE bacmp(BDADDR_ANY, BDADDR_NONE); +#else + bacmp(BDADDR_ANY, BDADDR_LOCAL); +#endif + return 0; } |