public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: avoid GCC 10 error with -Werror=parentheses
Date: Mon, 28 Sep 2020 13:12:32 +0000 (GMT)	[thread overview]
Message-ID: <20200928131232.89E953941C2D@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3bb579a43c09d18217a19035054817591eb8d870

commit 3bb579a43c09d18217a19035054817591eb8d870
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sat Sep 19 15:51:10 2020 +0100

    Cygwin: avoid GCC 10 error with -Werror=parentheses
    
    ../../../../src/winsup/cygwin/fhandler_socket_inet.cc: In member function 'ssize_t fhandler_socket_wsock::send_internal(_WSAMSG*, int)':
    ../../../../src/winsup/cygwin/fhandler_socket_inet.cc:1381:69: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]

Diff:
---
 winsup/cygwin/fhandler_socket_inet.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc
index 2b50671e5..71e92e341 100644
--- a/winsup/cygwin/fhandler_socket_inet.cc
+++ b/winsup/cygwin/fhandler_socket_inet.cc
@@ -1378,7 +1378,7 @@ fhandler_socket_wsock::send_internal (struct _WSAMSG *wsamsg, int flags)
      buffer which only gets partially written. */
   for (DWORD in_idx = 0, in_off = 0;
        in_idx < wsamsg->dwBufferCount;
-       in_off >= wsamsg->lpBuffers[in_idx].len && (++in_idx, in_off = 0))
+       in_off >= wsamsg->lpBuffers[in_idx].len && (++in_idx, (in_off = 0)))
     {
       /* Split a message into the least number of pieces to minimize the
 	 number of WsaSendTo calls.  Don't split datagram messages (bad idea).


                 reply	other threads:[~2020-09-28 13:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928131232.89E953941C2D@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).