summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-08-29 10:02:58 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-08-31 07:11:31 +0000
commit2a52a400d6692b4f42d955302dee651646664385 (patch)
treeb8d930fbee51790c051a52ec183f61843fe0fb04 /config.tests
parent90ae576699eef5fb3663cfc5136113e6773f3def (diff)
Fix bluez config test failure on clang
This compile failure used to be a warning only but these days is a failure for clang: > /home/ablasche/dev/qt/qt512/qtconnectivity/config.tests/bluez/main.cpp:36:11: error: taking the address of a temporary object of type 'bdaddr_t' [-Waddress-of-temporary] > bacmp(BDADDR_ANY, BDADDR_LOCAL); > ^~~~~~~~~~ > /usr/include/bluetooth/bluetooth.h:310:23: note: expanded from macro 'BDADDR_ANY' > #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /home/ablasche/dev/qt/qt512/qtconnectivity/config.tests/bluez/main.cpp:36:23: error: taking the address of a temporary object of type 'bdaddr_t' [-Waddress-of-temporary] > bacmp(BDADDR_ANY, BDADDR_LOCAL); > ^~~~~~~~~~~~ > /usr/include/bluetooth/bluetooth.h:312:23: note: expanded from macro 'BDADDR_LOCAL' > #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2 errors generated. The need for BDADDR_NONE is obsolete now since the test does not rely on those defines anymore. The main purpose is to check that bluetooth.h is available which is already tested by using bacmp and bdaddr_t. Change-Id: I09da4dc5cd3945ffae7819628b45477a52789006 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/bluez/main.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/config.tests/bluez/main.cpp b/config.tests/bluez/main.cpp
index 3fe5ee09..2e978b85 100644
--- a/config.tests/bluez/main.cpp
+++ b/config.tests/bluez/main.cpp
@@ -30,11 +30,10 @@
int main()
{
-#ifdef BDADDR_NONE
- bacmp(BDADDR_ANY, BDADDR_NONE);
-#else
- bacmp(BDADDR_ANY, BDADDR_LOCAL);
-#endif
+ bdaddr_t anyTmp = {{0, 0, 0, 0, 0, 0}};
+ bdaddr_t localTmp = {{0, 0, 0, 0xff, 0xff, 0xff}};
+
+ bacmp(&anyTmp, &localTmp);
return 0;
}