summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d17305)
raw | patch | inline | side by side (parent: 2d17305)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Mar 2016 12:44:59 +0000 (13:44 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Mar 2016 12:44:59 +0000 (13:44 +0100) |
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 */
^
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 */
^
src/curl_json.c | patch | blob | history |
diff --git a/src/curl_json.c b/src/curl_json.c
index 556263f6f75bbbc87e74ccb893ba42285e11a537..45898c3ec1115ed9c7b6c8fd0f0c463b1370ff66 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
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));