2019-05-08 19:23:11

by Gix, Brian

[permalink] [raw]
Subject: Build Warnings, BlueZ TIP, Fedora-30

These 3 new build warnings showed up when I upgraded one of my devices to Fedora 30.

They are all in the Android subtree.


$ gcc --version
gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)

$ uname -a
Linux bgix-nuc-1.sea.intel.com 5.0.11-300.fc30.x86_64 #1 SMP Thu May 2 14:11:38 UTC 2019 x86_64 x86_64 x86_64
GNU/Linux

$ make -k
make --no-print-directory all-am
CC android/avrcp-lib.o
android/avrcp-lib.c: In function ‘get_element_attributes’:
android/avrcp-lib.c:967:27: error: taking address of packed member of ‘struct get_element_attributes_req’ may
result in an unaligned pointer value [-Werror=address-of-packed-member]
967 | if (!parse_attributes(req->attrs, params_len - sizeof(*req),
| ~~~^~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:6578: android/avrcp-lib.o] Error 1
CC android/handsfree.o
android/handsfree.c: In function ‘bt_sco_get_fd’:
android/handsfree.c:2913:47: error: taking address of packed member of ‘struct sco_rsp_get_fd’ may result in an
unaligned pointer value [-Werror=address-of-packed-member]
2913 | if (!dev || !bt_sco_get_fd_and_mtu(sco, &fd, &rsp.mtu))
| ^~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:6578: android/handsfree.o] Error 1
CC android/bluetooth_default_la-hal-bluetooth.lo
android/hal-bluetooth.c: In function ‘set_adapter_property’:
android/hal-bluetooth.c:659:46: error: taking address of packed member of ‘struct hal_cmd_set_adapter_prop’ may
result in an unaligned pointer value [-Werror=address-of-packed-member]
659 | adapter_prop_from_hal(property, &cmd->type, &cmd->len, cmd->val);
| ^~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:6637: android/bluetooth_default_la-hal-bluetooth.lo] Error 1
make[1]: Target 'all-am' not remade because of errors.
make: *** [Makefile:3872: all] Error 2


2019-05-10 09:03:04

by Bastien Nocera

[permalink] [raw]
Subject: Re: Build Warnings, BlueZ TIP, Fedora-30

On Wed, 2019-05-08 at 19:21 +0000, Gix, Brian wrote:
> These 3 new build warnings showed up when I upgraded one of my
> devices to Fedora 30.
>
> They are all in the Android subtree.

I sent patches for those to the list yesterday, would be nice if you
could test them. They were only compile-tested.

Cheers

2019-05-10 16:17:12

by Gix, Brian

[permalink] [raw]
Subject: Re: Build Warnings, BlueZ TIP, Fedora-30

Hi Bastien,

On Fri, 2019-05-10 at 11:01 +0200, Bastien Nocera wrote:
> On Wed, 2019-05-08 at 19:21 +0000, Gix, Brian wrote:
> > These 3 new build warnings showed up when I upgraded one of my
> > devices to Fedora 30.
> >
> > They are all in the Android subtree.
>
> I sent patches for those to the list yesterday, would be nice if you
> could test them. They were only compile-tested.

I have reviewed your three android patches, and think they will work correctly.

I do not have the ability at the moment to build-test them until later today (Pacific Coast US time (PDT)) and
do not have the ability to run test them at all.

But in my opinion, should they build correctly on Fedora-30, they deserve to be applied.

note: Those were just 3 of 8 patches in your set, and I have not reviewed the others.