Parent: d8e7311bcd3b756481bc1f99e324a2df9e21ada6
Author: Brian Gix <brian.gix@intel.com>
Committer: Brian Gix <brian.gix@intel.com>
Date: 2021-01-28 01:04:01
Tree: 9d6c4f99c1f0756394e9639a3809d5ea2a3adc96
advertising: Fix formater for size_t data type On some 32 bit systems sizeof does not return (unsigned long). The size_t formater %zu handles this across architectures. Fixes the error: In file included from src/advertising.c:30: src/advertising.c: In function ‘read_controller_cap_complete’: src/log.h:60:20: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Werror=format=] 60 | btd_error(0xffff, "%s:%s() " fmt, __FILE__, __func__, ## arg) | ^~~~~~~~~~ src/advertising.c:1757:3: note: in expansion of macro ‘error’ 1757 | error("Controller capabilities malformed, size %lu != %u", | ^~~~~ src/advertising.c:1757:52: note: format string is defined here 1757 | error("Controller capabilities malformed, size %lu != %u", | ~~^ | | | long unsigned int | %u
Diffstat
| M | src/advertising.c | | | 2 | +- |
1 files changed, 1 insertions(+), 1 deletions(-)