aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/regex
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
commite0554a531f17f56167f978eddf29a09cc6ae9f32 (patch)
tree3b5579370346d51f378192429db2130e5e82a6e4 /lib/libc/regex
parent9d4156aed31c055ba32bc23b2a53d885002de085 (diff)
downloadsrc-e0554a531f17f56167f978eddf29a09cc6ae9f32.tar.gz
src-e0554a531f17f56167f978eddf29a09cc6ae9f32.zip
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
Notes
Notes: svn path=/head/; revision=111010
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/engine.c6
-rw-r--r--lib/libc/regex/regcomp.c4
-rw-r--r--lib/libc/regex/regexec.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index a5f39ded4c5f..9d69c1e98991 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -186,8 +186,8 @@ int eflags;
pp = mustlast;
for (dp = start+g->mlen-1; dp < stop;) {
/* Fast skip non-matches */
- while (dp < stop && charjump[*dp])
- dp += charjump[*dp];
+ while (dp < stop && charjump[(int)*dp])
+ dp += charjump[(int)*dp];
if (dp >= stop)
break;
@@ -203,7 +203,7 @@ int eflags;
/* Jump to next possible match */
mj = matchjump[pp - mustfirst];
- cj = charjump[*dp];
+ cj = charjump[(int)*dp];
dp += (cj < mj ? mj : cj);
pp = mustlast;
}
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 07c3955b2e4a..e342fdaf3cb2 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -106,7 +106,7 @@ static void freeset(struct parse *p, cset *cs);
static int freezeset(struct parse *p, cset *cs);
static int firstch(struct parse *p, cset *cs);
static int nch(struct parse *p, cset *cs);
-static void mcadd(struct parse *p, cset *cs, char *cp);
+static void mcadd(struct parse *p, cset *cs, char *cp) __unused;
#if used
static void mcsub(cset *cs, char *cp);
static int mcin(cset *cs, char *cp);
@@ -1964,7 +1964,7 @@ struct re_guts *g;
* is the first one that would be matched).
*/
for (mindex = 0; mindex < g->mlen; mindex++)
- g->charjump[g->must[mindex]] = g->mlen - mindex - 1;
+ g->charjump[(int)g->must[mindex]] = g->mlen - mindex - 1;
}
/*
diff --git a/lib/libc/regex/regexec.c b/lib/libc/regex/regexec.c
index abbd9bae5635..c13c72df7fe6 100644
--- a/lib/libc/regex/regexec.c
+++ b/lib/libc/regex/regexec.c
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
#include "utils.h"
#include "regex2.h"
-static int nope = 0; /* for use in asserts; shuts lint up */
+static int nope __unused = 0; /* for use in asserts; shuts lint up */
/* macros for manipulating states, small version */
#define states long