aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-24 08:04:42 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-24 08:04:42 +0000
commitdcc0b2447ee35addf2688c07bf6a5f984d043344 (patch)
treefb483909f4ba75611b88391a452bd13379a70de4
parent-r 1026:1032 (diff)
downloadopenvpn-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
Diffstat (limited to '')
-rw-r--r--buffer.c2
-rw-r--r--buffer.h6
-rw-r--r--configure.ac4
-rw-r--r--crypto.c6
-rw-r--r--options.c2
-rw-r--r--pkcs11-helper.c2
-rw-r--r--syshead.h4
-rw-r--r--tun.c2
8 files changed, 16 insertions, 12 deletions
diff --git a/buffer.c b/buffer.c
index e66c6a4..64307ef 100644
--- a/buffer.c
+++ b/buffer.c
@@ -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;
diff --git a/buffer.h b/buffer.h
index f95c5e1..8d04103 100644
--- a/buffer.h
+++ b/buffer.h
@@ -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
diff --git a/crypto.c b/crypto.c
index d0a4284..5b723b3 100644
--- a/crypto.c
+++ b/crypto.c
@@ -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",
diff --git a/options.c b/options.c
index 3295c48..94da98e 100644
--- a/options.c
+++ b/options.c
@@ -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) {
diff --git a/syshead.h b/syshead.h
index f296fe0..499dd67 100644
--- a/syshead.h
+++ b/syshead.h
@@ -105,6 +105,10 @@
#include <errno.h>
#endif
+#ifdef HAVE_ERR_H
+#include <err.h>
+#endif
+
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
diff --git a/tun.c b/tun.c
index 971b2ce..d2cf0de 100644
--- a/tun.c
+++ b/tun.c
@@ -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)