]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
options: Avoid some conversion warnings master
authorFrank Lichtenheld <frank@lichtenheld.com>
Sat, 13 Dec 2025 08:42:18 +0000 (09:42 +0100)
committerGert Doering <gert@greenie.muc.de>
Sat, 13 Dec 2025 12:27:02 +0000 (13:27 +0100)
Just use the correct types.

Change-Id: I02db40d7335df7ab037ae1deb3e20f25a9b199bd
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1440
Message-Id: <20251213084225.30988-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35061.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/options.h

index 24c3e9215e3b452d6d0462b71167a8edcd786d3f..34af0d31d444737d46bfd413e1365574603d7ff9 100644 (file)
@@ -1154,13 +1154,8 @@ ipv6_addr_safe_hexplusbits(const char *ipv6_prefix_spec)
     return get_ipv6_addr(ipv6_prefix_spec, &t_addr, &t_bits, M_WARN);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 static char *
-string_substitute(const char *src, int from, int to, struct gc_arena *gc)
+string_substitute(const char *src, char from, char to, struct gc_arena *gc)
 {
     char *ret = (char *)gc_malloc(strlen(src) + 1, true, gc);
     char *dest = ret;
@@ -9306,10 +9301,6 @@ err:
     gc_free(&gc);
 }
 
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 bool
 has_udp_in_local_list(const struct options *options)
 {
index 555d9dd66bc5aac8b211af0572de9f7b6dbead48..0561c2563d8ba9223fb8664c8f45e24bf7da0f58 100644 (file)
@@ -801,7 +801,7 @@ struct pull_filter
 #define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching option */
 #define PUF_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR1 */
     int type;
-    int size;
+    size_t size;
     char *pattern;
     struct pull_filter *next;
 };