pipewire: module-vban: fix vban serial header

The expression `VBAN_PROTOCOL_SERIAL | vban_BPSList[14]` is assigned
to an 8 bit field of the header, but, `vban_BPSList[14]` being
115200, it does not fit. Instead, its index, 14, should be
placed in the header.

In addition to fixing the issue, add `-Werror=constant-conversion`,
and clang diagnostic that catches such issues.

Fixes: 1a5514e5cf ("module-vban: create streams per stream_name")
This commit is contained in:
Barnabás Pőcze 2024-12-14 22:43:25 +01:00
parent a4e2d9cbb0
commit 705c2a652b
3 changed files with 59 additions and 7 deletions

View file

@ -101,6 +101,7 @@ common_flags = [
'-Wunused-result',
'-Werror=return-type',
'-Werror=float-conversion',
'-Werror=constant-conversion',
]
cc_flags = common_flags + [