Attention is currently required from: Arne Schwabe, Frank Lichtenheld, Răzvan 
Cojocaru.

Hello Arne Schwabe, Răzvan Cojocaru,

I'd like you to reexamine a change. Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2339?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+2 by Răzvan Cojocaru

The change is no longer submittable: Code-Review and checks~ChecksSubmitRule 
are unsatisfied now.


Change subject: manage: Fix conversion warnings in man_write
......................................................................

manage: Fix conversion warnings in man_write

Use openvpn_send to avoid warnings due to
Windows/Unix differences.

Change-Id: I87dd41b66f7d77cab7aaf80fa9d9095e46c033d5
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/manage.c
1 file changed, 4 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/2339/2

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index addd6f2..e917b35 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -2448,11 +2448,6 @@

 #endif /* ifdef TARGET_ANDROID */

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
-#endif
-
 static ssize_t
 man_read(struct management *man)
 {
@@ -2550,14 +2545,14 @@
 static ssize_t
 man_write(struct management *man)
 {
-    const int size_hint = 1024;
+    const size_t size_hint = 1024;
     ssize_t sent = 0;

     buffer_list_aggregate(man->connection.out, size_hint);
     const struct buffer *buf = buffer_list_peek(man->connection.out);
-    if (buf && BLEN(buf))
+    if (buf && BLEN(buf) > 0)
     {
-        const int len = min_int(size_hint, BLEN(buf));
+        const size_t len = min_size(size_hint, BLENZ(buf));
 #ifdef TARGET_ANDROID
         if (man->connection.fdtosend > 0)
         {
@@ -2568,7 +2563,7 @@
         else
 #endif
         {
-            sent = send(man->connection.sd_cli, CBSTR(buf), len, MSG_NOSIGNAL);
+            sent = openvpn_send(man->connection.sd_cli, CBSTR(buf), len, 
MSG_NOSIGNAL);
         }
         if (sent >= 0)
         {
@@ -2591,10 +2586,6 @@
     return sent;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 static void
 man_connection_clear(struct man_connection *mc)
 {

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I87dd41b66f7d77cab7aaf80fa9d9095e46c033d5
Gerrit-Change-Number: 2339
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Răzvan Cojocaru <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
Gerrit-Attention: Frank Lichtenheld <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
  • [Openvpn-devel] [S] Chan... Frank Lichtenheld (Code Review) via Openvpn-devel

Reply via email to