cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1261?usp=email )
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]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1261 Message-Id: <[email protected]> URL: https://sourceforge.net/p/openvpn/mailman/message/59244107/ Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/options_util.c 1 file changed, 1 insertion(+), 10 deletions(-) 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004 Gerrit-Change-Number: 1261 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
