Parent: 26ef5a951e8111d360586f1169b8fac2dc2cb613
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-02-04 22:18:44
Tree: 30e563a7d1e95803065b065a5f69a078da1f6e3a
emulator: Fix Werror=stringop-overflow This fixes the following build errors caused by buf being used as a static from tracking progress of a packet when it is not necessary since pkt_data exists for the same reason: /usr/include/bits/unistd.h:32:10: error: ‘__read_alias’ specified size between 18446744073709490177 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 32 | return __glibc_fortify (read, __nbytes, sizeof (char), | ^~~~~~~~~~~~~~~ emulator/serial.c: In function ‘serial_read_callback’: emulator/serial.c:78:24: note: destination object allocated here 78 | static uint8_t buf[4096]; | ^~~ /usr/include/bits/unistd-decl.h:29:16: note: in a call to function ‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’ 29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void *__buf, | ^~~~~~~~~~~~~~~~~~ Fixes: https://github.com/bluez/bluez/issues/1049
Diffstat
| M | emulator/serial.c | | | 7 | +++- - - - |
1 files changed, 3 insertions(+), 4 deletions(-)