Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1261?usp=email

to review the following change.


Change subject: options_util: Fix conversion warning in atoi_constrained
......................................................................

options_util: Fix conversion warning in atoi_constrained

The whole purpose of the function is to make sure
that cast is safe.

Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M src/openvpn/options_util.c
1 file changed, 1 insertion(+), 10 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1261/1

diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c
index 8a1c083..eba7d39 100644
--- a/src/openvpn/options_util.c
+++ b/src/openvpn/options_util.c
@@ -162,11 +162,6 @@
     return (int)i;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 bool
 atoi_constrained(const char *str, int *value, const char *name, int min, int 
max, msglvl_t msglevel)
 {
@@ -194,14 +189,10 @@
         return false;
     }

-    *value = i;
+    *value = (int)i;
     return true;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 static const char *updatable_options[] = { "block-ipv6", "block-outside-dns",
                                            "dhcp-option", "dns",
                                            "ifconfig", "ifconfig-ipv6",

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004
Gerrit-Change-Number: 1261
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to