* braces around scalar initializer for type
@ 2015-03-12 18:18 Alexey Pavlov
2015-03-12 19:22 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Pavlov @ 2015-03-12 18:18 UTC (permalink / raw)
To: cygwin-patches
Building MSYS2 runtime I'm get:
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:82:56:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:83:66:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/../Makefile.common:43:
recipe for target 'net.o' failed
So I think next patch can be applied:
From 9c11fcf2fc74601eb48e8060b6575b56be111a02 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Thu, 12 Mar 2015 14:33:39 +0300
Subject: [PATCH] Fix error "braces around scalar initializer for type"
---
winsup/cygwin/net.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index e06fd52..f9b317c 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -79,8 +79,8 @@ extern "C"
const unsigned char *);
} /* End of "C" section */
-const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
-const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
static fhandler_socket *
get (const int fd)
--
2.3.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: braces around scalar initializer for type
2015-03-12 18:18 braces around scalar initializer for type Alexey Pavlov
@ 2015-03-12 19:22 ` Corinna Vinschen
2015-03-12 19:47 ` Alexey Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-03-12 19:22 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
Alexey,
On Mar 12 21:18, Alexey Pavlov wrote:
> Building MSYS2 runtime I'm get:
>
> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:82:56:
> error: braces around scalar initializer for type 'u_char {aka unsigned
> char}'
> const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
>
> ^
> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:83:66:
> error: braces around scalar initializer for type 'u_char {aka unsigned
> char}'
> const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
>
> ^
> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/../Makefile.common:43:
> recipe for target 'net.o' failed
>
> So I think next patch can be applied:
I'm ok with that patch, but it's missing the ChangeLog entry, Please
provide ChangeLog entries per https://cygwin.com/contrib.html.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: braces around scalar initializer for type
2015-03-12 19:22 ` Corinna Vinschen
@ 2015-03-12 19:47 ` Alexey Pavlov
2015-03-13 9:44 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Pavlov @ 2015-03-12 19:47 UTC (permalink / raw)
To: cygwin-patches
2015-03-12 22:22 GMT+03:00 Corinna Vinschen:
> Alexey,
>
> On Mar 12 21:18, Alexey Pavlov wrote:
>> Building MSYS2 runtime I'm get:
>>
>> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:82:56:
>> error: braces around scalar initializer for type 'u_char {aka unsigned
>> char}'
>> const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
>>
>> ^
>> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:83:66:
>> error: braces around scalar initializer for type 'u_char {aka unsigned
>> char}'
>> const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
>>
>> ^
>> /build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/../Makefile.common:43:
>> recipe for target 'net.o' failed
>>
>> So I think next patch can be applied:
>
> I'm ok with that patch, but it's missing the ChangeLog entry, Please
> provide ChangeLog entries per https://cygwin.com/contrib.html.
>
From c416f9666f21084ce73d13b479d13308c0fc7340 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Thu, 12 Mar 2015 22:46:01 +0300
Subject: [PATCH] Remove extra braces around single values.
---
winsup/cygwin/ChangeLog | 4 ++++
winsup/cygwin/net.cc | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1305dfa..96d3de9 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2015-03-12 Alexey Pavlov <alexpux@gmail.com>
+ * net.cc: Remove extra braces.
+
+2015-03-12 Alexey Pavlov <alexpux@gmail.com>
+
* include/cygwin/version.h: Fix typo.
2015-03-12 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index e06fd52..f9b317c 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -79,8 +79,8 @@ extern "C"
const unsigned char *);
} /* End of "C" section */
-const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
-const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
static fhandler_socket *
get (const int fd)
--
2.3.0
>
> Thanks,
> Corinna
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Maintainer cygwin AT cygwin DOT com
> Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: braces around scalar initializer for type
2015-03-12 19:47 ` Alexey Pavlov
@ 2015-03-13 9:44 ` Corinna Vinschen
2015-03-13 10:04 ` Alexey Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-03-13 9:44 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
Hi Alexey,
On Mar 12 22:47, Alexey Pavlov wrote:
> 2015-03-12 22:22 GMT+03:00 Corinna Vinschen:
> > I'm ok with that patch, but it's missing the ChangeLog entry, Please
> > provide ChangeLog entries per https://cygwin.com/contrib.html.
>
> + * net.cc: Remove extra braces.
> +
Please send the ChangeLog as plain text, not as diff. It's not much of
a problem in our current case, but ChangeLog diff's don't apply cleanly
most of the time.
> -const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
> -const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
> +const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
> +const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
Patch applied.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: braces around scalar initializer for type
2015-03-13 9:44 ` Corinna Vinschen
@ 2015-03-13 10:04 ` Alexey Pavlov
0 siblings, 0 replies; 5+ messages in thread
From: Alexey Pavlov @ 2015-03-13 10:04 UTC (permalink / raw)
To: cygwin-patches
2015-03-13 12:44 GMT+03:00 Corinna Vinschen <corinna-cygwin@cygwin.com>:
> Hi Alexey,
>
> On Mar 12 22:47, Alexey Pavlov wrote:
>> 2015-03-12 22:22 GMT+03:00 Corinna Vinschen:
>> > I'm ok with that patch, but it's missing the ChangeLog entry, Please
>> > provide ChangeLog entries per https://cygwin.com/contrib.html.
>>
>> + * net.cc: Remove extra braces.
>> +
>
> Please send the ChangeLog as plain text, not as diff. It's not much of
> a problem in our current case, but ChangeLog diff's don't apply cleanly
> most of the time.
Ok will do next time.
>
>> -const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
>> -const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
>> +const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
>> +const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
>
> Patch applied.
>
Thanks!
>
> Thanks,
> Corinna
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Maintainer cygwin AT cygwin DOT com
> Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-13 10:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 18:18 braces around scalar initializer for type Alexey Pavlov
2015-03-12 19:22 ` Corinna Vinschen
2015-03-12 19:47 ` Alexey Pavlov
2015-03-13 9:44 ` Corinna Vinschen
2015-03-13 10:04 ` Alexey Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).