Seen on FreeBSD:
curl_json.c: In function 'cj_sock_perform':
curl_json.c:864:10: warning: missing initializer for field 'sun_len' of 'struct sockaddr_un' [-Wmissing-field-initializers]
struct sockaddr_un sa_unix = {};
^
In file included from curl_json.c:32:0:
/usr/include/sys/un.h:48:16: note: 'sun_len' declared here
unsigned char sun_len; /* sockaddr len including null */
^
static int cj_sock_perform (cj_t *db) /* {{{ */
{
char errbuf[1024];
- struct sockaddr_un sa_unix = {};
+ struct sockaddr_un sa_unix = { 0 };
sa_unix.sun_family = AF_UNIX;
sstrncpy (sa_unix.sun_path, db->sock, sizeof (sa_unix.sun_path));