[Openvpn-devel] [S] Change in openvpn[master]: reliable: Avoid conversion warning in reliable_send_timeout

"cron2 \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups net.sourceforge.lists.openvpn-devel
Message-ID <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1480?usp=email )

Change subject: reliable: Avoid conversion warning in reliable_send_timeout
......................................................................

reliable: Avoid conversion warning in reliable_send_timeout

It is not realistic that this produced big values
and we already discard negative values. So just use
whatever we get.

Change-Id: Iac4af315c6d7798f09a27383fc0a755a874b9881
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Razvan Cojocaru <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1480
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg38329.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/reliable.c
1 file changed, 1 insertion(+), 10 deletions(-)




diff --git a/src/openvpn/reliable.c b/src/openvpn/reliable.c
index 52adacf..690e50d6 100644
--- a/src/openvpn/reliable.c
+++ b/src/openvpn/reliable.c
@@ -687,11 +687,6 @@
     }
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 /* in how many seconds should we wake up to check for timeout */
 /* if we return BIG_TIMEOUT, nothing to wait for */
 interval_t
@@ -713,7 +708,7 @@
             }
             else
             {
-                ret = min_int(ret, e->next_try - local_now);
+                ret = min_int(ret, (int)(e->next_try - local_now));
             }
         }
     }
@@ -724,10 +719,6 @@
     return ret;
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 /*
  * Enable an incoming buffer previously returned by a get function as active.
  */

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1480?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iac4af315c6d7798f09a27383fc0a755a874b9881
Gerrit-Change-Number: 1480
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-Reviewer: razvanc <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.