aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-01-10 12:53:51 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-01-10 12:53:51 -0800
commitca0b7b54ad00ff1d6d465cc1cf0c307293d721cc (patch)
treea44cf0c0225db7b55f7f770f174e95ca4d586b0e
parent8682e180c7ecf747b6e9e4a65346dd0c779411c6 (diff)
downloadsyslinux.git-ca0b7b54ad00ff1d6d465cc1cf0c307293d721cc.tar.gz
syslinux.git-ca0b7b54ad00ff1d6d465cc1cf0c307293d721cc.tar.xz
syslinux.git-ca0b7b54ad00ff1d6d465cc1cf0c307293d721cc.zip
com32/lib: fix warning in str*cmp()
Shut up a warning about initializing pointer across signedness. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/lib/strcasecmp.c3
-rw-r--r--com32/lib/strcmp.c3
-rw-r--r--com32/lib/strncasecmp.c3
-rw-r--r--com32/lib/strncmp.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/com32/lib/strcasecmp.c b/com32/lib/strcasecmp.c
index 849c21fd..30949a09 100644
--- a/com32/lib/strcasecmp.c
+++ b/com32/lib/strcasecmp.c
@@ -7,7 +7,8 @@
int strcasecmp(const char *s1, const char *s2)
{
- const unsigned char *c1 = s1, *c2 = s2;
+ const unsigned char *c1 = (const unsigned char *)s1;
+ const unsigned char *c2 = (const unsigned char *)s2;
unsigned char ch;
int d = 0;
diff --git a/com32/lib/strcmp.c b/com32/lib/strcmp.c
index 77bb2b41..47a4aad8 100644
--- a/com32/lib/strcmp.c
+++ b/com32/lib/strcmp.c
@@ -6,7 +6,8 @@
int strcmp(const char *s1, const char *s2)
{
- const unsigned char *c1 = s1, *c2 = s2;
+ const unsigned char *c1 = (const unsigned char *)s1;
+ const unsigned char *c2 = (const unsigned char *)s2;
unsigned char ch;
int d = 0;
diff --git a/com32/lib/strncasecmp.c b/com32/lib/strncasecmp.c
index 8b8b967a..2caac0a5 100644
--- a/com32/lib/strncasecmp.c
+++ b/com32/lib/strncasecmp.c
@@ -7,7 +7,8 @@
int strncasecmp(const char *s1, const char *s2, size_t n)
{
- const unsigned char *c1 = s1, *c2 = s2;
+ const unsigned char *c1 = (const unsigned char *)s1;
+ const unsigned char *c2 = (const unsigned char *)s2;
unsigned char ch;
int d = 0;
diff --git a/com32/lib/strncmp.c b/com32/lib/strncmp.c
index f2f2f022..e41b9e36 100644
--- a/com32/lib/strncmp.c
+++ b/com32/lib/strncmp.c
@@ -6,7 +6,8 @@
int strncmp(const char *s1, const char *s2, size_t n)
{
- const unsigned char *c1 = s1, *c2 = s2;
+ const unsigned char *c1 = (const unsigned char *)s1;
+ const unsigned char *c2 = (const unsigned char *)s2;
unsigned char ch;
int d = 0;