All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: Fix loading of connection parameters
@ 2022-02-15 21:03 Luiz Augusto von Dentz
  2022-02-15 22:24 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-15 21:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Connection parameters options is part of LE group nowadays.

Fixes: https://github.com/bluez/bluez/issues/293
---
 src/adapter.c | 59 +++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 45 insertions(+), 14 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index eef50f67a..754fa6bcf 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3893,24 +3893,55 @@ static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
 							uint8_t bdaddr_type)
 {
 	struct conn_param *param;
+	int min_interval, max_interval, latency, timeout;
+	GError *gerr = NULL;
 
-	if (!g_key_file_has_group(key_file, "ConnectionParameters"))
-		return NULL;
+	min_interval = g_key_file_get_integer(key_file, "LE",
+						"MinConnectionInterval", &gerr);
+	if (gerr) {
+		min_interval = -1;
+		g_clear_error(gerr);
+	}
+
+	max_interval = g_key_file_get_integer(key_file, "LE",
+						"MaxConnetionInterval", NULL);
+	if (gerr) {
+		max_interval = -1;
+		g_clear_error(gerr);
+	}
+
+	latency = g_key_file_get_integer(key_file, "LE",
+					"ConnectionLatency", NULL);
+	if (gerr) {
+		latency = -1;
+		g_clear_error(gerr);
+	}
+
+	timeout = g_key_file_get_integer(key_file, "LE",
+					"ConnetionSupervisionTimeout", NULL);
+	if (gerr) {
+		timeout = -1;
+		g_clear_error(gerr);
+	}
+
+	/* If no field was set don't attempt to load */
+	if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
+		return;
 
 	param = g_new0(struct conn_param, 1);
 
-	param->min_interval = g_key_file_get_integer(key_file,
-							"ConnectionParameters",
-							"MinInterval", NULL);
-	param->max_interval = g_key_file_get_integer(key_file,
-							"ConnectionParameters",
-							"MaxInterval", NULL);
-	param->latency = g_key_file_get_integer(key_file,
-							"ConnectionParameters",
-							"Latency", NULL);
-	param->timeout = g_key_file_get_integer(key_file,
-							"ConnectionParameters",
-							"Timeout", NULL);
+	if (min_interval > 0)
+		param->min_interval = min_interval;
+
+	if (max_interval > 0)
+		param->max_interval = max_interval;
+
+	if (latency > 0)
+		param->latency = latency;
+
+	if (timeout > 0)
+		param->timeout = timeout;
+
 	str2ba(peer, &param->bdaddr);
 	param->bdaddr_type = bdaddr_type;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [BlueZ] adapter: Fix loading of connection parameters
  2022-02-15 21:03 [PATCH BlueZ] adapter: Fix loading of connection parameters Luiz Augusto von Dentz
@ 2022-02-15 22:24 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2022-02-15 22:24 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 23921 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=614698

---Test result---

Test Summary:
CheckPatch                    PASS      1.47 seconds
GitLint                       PASS      1.03 seconds
Prep - Setup ELL              PASS      45.71 seconds
Build - Prep                  PASS      0.87 seconds
Build - Configure             PASS      9.25 seconds
Build - Make                  FAIL      1625.33 seconds
Make Check                    FAIL      1.21 seconds
Make Check w/Valgrind         FAIL      321.22 seconds
Make Distcheck                FAIL      165.76 seconds
Build w/ext ELL - Configure   PASS      8.87 seconds
Build w/ext ELL - Make        FAIL      1578.33 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: Build - Make - FAIL
Desc: Build the BlueZ source tree
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12364:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12364 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  766 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  989 | int main(int argc, char *argv[])
      |     ^~~~
src/adapter.c: In function ‘get_conn_param’:
src/adapter.c:3903:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3903 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3910:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3910 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3917:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3917 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3924:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3924 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3928:46: error: ‘latecy’ undeclared (first use in this function); did you mean ‘latency’?
 3928 |  if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
      |                                              ^~~~~~
      |                                              latency
src/adapter.c:3928:46: note: each undeclared identifier is reported only once for each function it appears in
src/adapter.c:3929:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
 3929 |   return;
      |   ^~~~~~
src/adapter.c:3892:27: note: declared here
 3892 | static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
      |                           ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10187: src/bluetoothd-adapter.o] Error 1
make: *** [Makefile:4308: all] Error 2


##############################
Test: Make Check - FAIL
Desc: Run 'make check'
Output:
src/adapter.c: In function ‘get_conn_param’:
src/adapter.c:3903:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3903 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3910:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3910 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3917:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3917 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3924:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3924 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3928:46: error: ‘latecy’ undeclared (first use in this function); did you mean ‘latency’?
 3928 |  if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
      |                                              ^~~~~~
      |                                              latency
src/adapter.c:3928:46: note: each undeclared identifier is reported only once for each function it appears in
src/adapter.c:3929:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
 3929 |   return;
      |   ^~~~~~
src/adapter.c:3892:27: note: declared here
 3892 | static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
      |                           ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10187: src/bluetoothd-adapter.o] Error 1
make: *** [Makefile:11278: check] Error 2


##############################
Test: Make Check w/Valgrind - FAIL
Desc: Run 'make check' with Valgrind
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12364:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12364 | int main(int argc, char *argv[])
      |     ^~~~
src/adapter.c: In function ‘get_conn_param’:
src/adapter.c:3903:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3903 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3910:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3910 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3917:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3917 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3924:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3924 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3928:46: error: ‘latecy’ undeclared (first use in this function); did you mean ‘latency’?
 3928 |  if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
      |                                              ^~~~~~
      |                                              latency
src/adapter.c:3928:46: note: each undeclared identifier is reported only once for each function it appears in
src/adapter.c:3929:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
 3929 |   return;
      |   ^~~~~~
src/adapter.c:3892:27: note: declared here
 3892 | static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
      |                           ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10187: src/bluetoothd-adapter.o] Error 1
make: *** [Makefile:4308: all] Error 2


##############################
Test: Make Distcheck - FAIL
Desc: Run distcheck to check the distribution
Output:
../../src/adapter.c: In function ‘get_conn_param’:
../../src/adapter.c:3903:17: warning: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Wincompatible-pointer-types]
 3903 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ../../src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
../../src/adapter.c:3910:17: warning: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Wincompatible-pointer-types]
 3910 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ../../src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
../../src/adapter.c:3917:17: warning: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Wincompatible-pointer-types]
 3917 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ../../src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
../../src/adapter.c:3924:17: warning: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Wincompatible-pointer-types]
 3924 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from ../../src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
../../src/adapter.c:3928:46: error: ‘latecy’ undeclared (first use in this function); did you mean ‘latency’?
 3928 |  if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
      |                                              ^~~~~~
      |                                              latency
../../src/adapter.c:3928:46: note: each undeclared identifier is reported only once for each function it appears in
../../src/adapter.c:3929:3: warning: ‘return’ with no value, in function returning non-void
 3929 |   return;
      |   ^~~~~~
../../src/adapter.c:3892:27: note: declared here
 3892 | static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
      |                           ^~~~~~~~~~~~~~
make[2]: *** [Makefile:10187: src/bluetoothd-adapter.o] Error 1
make[1]: *** [Makefile:4308: all] Error 2
make: *** [Makefile:11199: distcheck] Error 1


##############################
Test: Build w/ext ELL - Make - FAIL
Desc: Build BlueZ source with '--enable-external-ell' configuration
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12364:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12364 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  766 | int main(int argc, char *argv[])
      |     ^~~~
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
  989 | int main(int argc, char *argv[])
      |     ^~~~
src/adapter.c: In function ‘get_conn_param’:
src/adapter.c:3903:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3903 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3910:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3910 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3917:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3917 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3924:17: error: passing argument 1 of ‘g_clear_error’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3924 |   g_clear_error(gerr);
      |                 ^~~~
      |                 |
      |                 GError * {aka struct _GError *}
In file included from /usr/include/glib-2.0/glib/gthread.h:33,
                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /usr/include/glib-2.0/glib.h:32,
                 from src/adapter.c:28:
/usr/include/glib-2.0/glib/gerror.h:100:48: note: expected ‘GError **’ {aka ‘struct _GError **’} but argument is of type ‘GError *’ {aka ‘struct _GError *’}
  100 | void     g_clear_error         (GError       **err);
      |                                 ~~~~~~~~~~~~~~~^~~
src/adapter.c:3928:46: error: ‘latecy’ undeclared (first use in this function); did you mean ‘latency’?
 3928 |  if (min_interval < 0 && max_interval < 0 && latecy < 0 && timeout < 0)
      |                                              ^~~~~~
      |                                              latency
src/adapter.c:3928:46: note: each undeclared identifier is reported only once for each function it appears in
src/adapter.c:3929:3: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
 3929 |   return;
      |   ^~~~~~
src/adapter.c:3892:27: note: declared here
 3892 | static struct conn_param *get_conn_param(GKeyFile *key_file, const char *peer,
      |                           ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:10187: src/bluetoothd-adapter.o] Error 1
make: *** [Makefile:4308: all] Error 2




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-15 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 21:03 [PATCH BlueZ] adapter: Fix loading of connection parameters Luiz Augusto von Dentz
2022-02-15 22:24 ` [BlueZ] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.