diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2006-06-24 08:04:42 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2006-06-24 08:04:42 +0000 |
commit | dcc0b2447ee35addf2688c07bf6a5f984d043344 (patch) | |
tree | fb483909f4ba75611b88391a452bd13379a70de4 | |
parent | -r 1026:1032 (diff) | |
download | openvpn-dcc0b2447ee35addf2688c07bf6a5f984d043344.tar.xz |
Eliminated gcc 3.3.3 warnings on NetBSD
when ./configure --enable-strict is used.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1040 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r-- | buffer.c | 2 | ||||
-rw-r--r-- | buffer.h | 6 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | crypto.c | 6 | ||||
-rw-r--r-- | options.c | 2 | ||||
-rw-r--r-- | pkcs11-helper.c | 2 | ||||
-rw-r--r-- | syshead.h | 4 | ||||
-rw-r--r-- | tun.c | 2 |
8 files changed, 16 insertions, 12 deletions
@@ -637,7 +637,7 @@ np (const char *str) */ bool -char_class (const char c, const unsigned int flags) +char_class (const unsigned char c, const unsigned int flags) { if (!flags) return false; @@ -183,9 +183,9 @@ strncpynt (char *dest, const char *src, size_t maxlen) /* return true if string contains at least one numerical digit */ static inline bool -has_digit (const char* src) +has_digit (const unsigned char* src) { - char c; + unsigned char c; while ((c = *src++)) { if (isdigit(c)) @@ -595,7 +595,7 @@ const char *np (const char *str); #define CC_NAME (CC_ALNUM|CC_UNDERBAR) #define CC_CRLF (CC_CR|CC_NEWLINE) -bool char_class (const char c, const unsigned int flags); +bool char_class (const unsigned char c, const unsigned int flags); bool string_class (const char *str, const unsigned int inclusive, const unsigned int exclusive); bool string_mod (char *str, const unsigned int inclusive, const unsigned int exclusive, const char replace); diff --git a/configure.ac b/configure.ac index 50f27d5..cc30edc 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT([OpenVPN], [2.1_beta14a], [openvpn-users@lists.sourceforge.net], [openvpn]) +AC_INIT([OpenVPN], [2.1_beta14b], [openvpn-users@lists.sourceforge.net], [openvpn]) AM_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR(syshead.h) @@ -288,7 +288,7 @@ AC_CHECK_HEADERS(sys/time.h sys/socket.h sys/ioctl.h sys/stat.h dnl netinet/in.h netinet/in_systm.h netinet/ip.h dnl netinet/if_ether.h netinet/tcp.h resolv.h arpa/inet.h dnl netdb.h sys/uio.h linux/if_tun.h linux/sockios.h dnl - linux/types.h sys/poll.h sys/epoll.h dnl + linux/types.h sys/poll.h sys/epoll.h err.h dnl ) AC_CHECK_HEADERS(linux/errqueue.h,,, [#ifdef HAVE_LINUX_TYPES_H @@ -1012,7 +1012,7 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags) const char *error_filename = file; /* parse info */ - const char *cp; + const unsigned char *cp; int hb_index = 0; int line_num = 1; int line_index = 0; @@ -1063,10 +1063,10 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags) close (fd); } - cp = (char *)in.data; + cp = (unsigned char *)in.data; while (size) { - const char c = *cp; + const unsigned char c = *cp; #if 0 msg (M_INFO, "char='%c' s=%d ln=%d li=%d m=%d c=%d", @@ -2554,7 +2554,7 @@ positive_atoi (const char *str) } static inline bool -space (char c) +space (unsigned char c) { return c == '\0' || isspace (c); } diff --git a/pkcs11-helper.c b/pkcs11-helper.c index 99a67e2..fd8f7f1 100644 --- a/pkcs11-helper.c +++ b/pkcs11-helper.c @@ -6506,7 +6506,7 @@ _pkcs11h_locate_hexToBinary ( *p_target_size = 0; while (*p != '\0' && *p_target_size < target_max_size) { - if (isxdigit (*p)) { + if (isxdigit ((unsigned char)*p)) { buf[i%2] = *p; if ((i%2) == 1) { @@ -105,6 +105,10 @@ #include <errno.h> #endif +#ifdef HAVE_ERR_H +#include <err.h> +#endif + #ifdef HAVE_SYSLOG_H #include <syslog.h> #endif @@ -942,7 +942,7 @@ open_tun_generic (const char *dev, const char *dev_type, const char *dev_node, * explicit unit number. Try opening /dev/[dev]n * where n = [0, 255]. */ - if (dynamic && !has_digit(dev)) + if (dynamic && !has_digit((unsigned char *)dev)) { int i; for (i = 0; i < 256; ++i) |