diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2018-07-18 15:33:29 +0100 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2018-07-18 15:36:50 +0100 |
commit | 44360a51ef60f0dd9be61cd0a4f5a7aff1ffb1c3 (patch) | |
tree | 53bbf6494fc32e4e1a61de5c330602e6ffa995e9 /pcap-tstamp.manmisc.in | |
parent | f7efd5740a49bd5745c79e9287d14bc2e755c827 (diff) |
Address another -Wformat-truncation warning.
add_dev() does not imply a particular string length for the name and the
description, so it is OK just to increase the buffer size to make the
description fit. While at it, use sizeof() for snprintf() and unsigned
props for the unsigned structure members from <bluetooth/hci.h>.
./pcap-bt-linux.c: In function ‘bt_findalldevs’:
./pcap-bt-linux.c:115:58: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Wformat-truncation=]
pcap_snprintf(dev_descr, 30, "Bluetooth adapter number %d", i);
^~
./pcap-bt-linux.c:115:32: note: directive argument in the range [0, 2147483646]
pcap_snprintf(dev_descr, 30, "Bluetooth adapter number %d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'pcap-tstamp.manmisc.in')
0 files changed, 0 insertions, 0 deletions