The whole purpose of the function is to make sure
that cast is safe.
Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1261
Message-Id: <
20251008170202.10333-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/
59244107/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
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)
{
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",