Skip to content

Commit 2a9c8a8

Browse files
flichtenheldcron2
authored andcommitted
options: Avoid some conversion warnings
Just use the correct types. Change-Id: I02db40d7335df7ab037ae1deb3e20f25a9b199bd Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1440 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg35061.html Signed-off-by: Gert Doering <[email protected]>
1 parent 75cc34e commit 2a9c8a8

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/openvpn/options.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,13 +1154,8 @@ ipv6_addr_safe_hexplusbits(const char *ipv6_prefix_spec)
11541154
return get_ipv6_addr(ipv6_prefix_spec, &t_addr, &t_bits, M_WARN);
11551155
}
11561156

1157-
#if defined(__GNUC__) || defined(__clang__)
1158-
#pragma GCC diagnostic push
1159-
#pragma GCC diagnostic ignored "-Wconversion"
1160-
#endif
1161-
11621157
static char *
1163-
string_substitute(const char *src, int from, int to, struct gc_arena *gc)
1158+
string_substitute(const char *src, char from, char to, struct gc_arena *gc)
11641159
{
11651160
char *ret = (char *)gc_malloc(strlen(src) + 1, true, gc);
11661161
char *dest = ret;
@@ -9306,10 +9301,6 @@ add_option(struct options *options, char *p[], bool is_inline, const char *file,
93069301
gc_free(&gc);
93079302
}
93089303

9309-
#if defined(__GNUC__) || defined(__clang__)
9310-
#pragma GCC diagnostic pop
9311-
#endif
9312-
93139304
bool
93149305
has_udp_in_local_list(const struct options *options)
93159306
{

src/openvpn/options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ struct pull_filter
801801
#define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching option */
802802
#define PUF_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR1 */
803803
int type;
804-
int size;
804+
size_t size;
805805
char *pattern;
806806
struct pull_filter *next;
807807
};

0 commit comments

Comments
 (0)