STINNER Victor <vstin...@python.org> added the comment:
> Solves the "Make sure new member of socket address initialized." warning for > the bluetooth sockaddr_l2cap usage. You would to elaborate how you checked that all members of the socket address are initialized? Which socketmodule.c functions use this type? Are all members initialized? https://www.leidinger.net/FreeBSD/dox/netgraph/html/d2/de3/structsockaddr__l2cap.html A quick search points me to: https://www.leidinger.net/FreeBSD/dox/netgraph/html/d2/de3/structsockaddr__l2cap.html --- u_char l2cap_len u_char l2cap_family u_int16_t l2cap_psm bdaddr_t l2cap_bdaddr u_int16_t l2cap_cid u_int8_t l2cap_bdaddr_type --- In BTPROTO_L2CAP case of getsockaddrarg(), it seems like only l2cap_family and l2cap_bdaddr are set, other members are set to 0. Is it enough? It seems like the important call is: memset(addr, 0, sizeof(struct sockaddr_l2)); On FreeBSD, socketmodule.c uses: #define sockaddr_l2 sockaddr_l2cap ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46357> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com