From 38cc4287a2aff4b3a1a2caefda8714015bb73259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Sun, 22 May 2016 03:43:29 +0100 Subject: Reapply "ws80211: Disable shorten-64-to-32." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable shorten-64-to-32 in ws80211_create_on_demand_interface, which calls NLA_PUT_STRING, which passes the output of strlen to an int parameter. NLA_PUT_STRING is defined in netlink/attr.h so there's not much we can do to fix it directly. By Gerald in b8f90de70efa2d271274fbb48df12737f6eddd12. Change-Id: Ifb92244423fcb2cc267f8fcefb7a2700a7b7c0ea Reviewed-on: https://code.wireshark.org/review/15522 Reviewed-by: João Valverde --- caputils/ws80211_utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'caputils') diff --git a/caputils/ws80211_utils.c b/caputils/ws80211_utils.c index 66e935fa87..4f9a6927b6 100644 --- a/caputils/ws80211_utils.c +++ b/caputils/ws80211_utils.c @@ -727,6 +727,8 @@ out_err: return -1; } +/* Needed for NLA_PUT_STRING, which passes strlen as an int */ +DIAG_OFF_CLANG(shorten-64-to-32) static int ws80211_create_on_demand_interface(const char *name) { int devidx, phyidx, err; @@ -765,6 +767,7 @@ nla_put_failure: fprintf(stderr, "building message failed\n"); return 2; } +DIAG_ON_CLANG(shorten-64-to-32) int ws80211_set_freq(const char *name, int freq, int chan_type, int _U_ center_freq, int _U_ center_freq2) { -- cgit v1.2.1