summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-11-15 18:49:31 +0000
committerngie <ngie@FreeBSD.org>2015-11-15 18:49:31 +0000
commitefc8c660fa5674795a86179feb8a34d1ee62831d (patch)
treebe213440f5ca2e83cce23b6d25adf7a73ec15096 /contrib/netbsd-tests
parentde769acd4d34f24192df1210e9b5bc15a7cd48d0 (diff)
downloadFreeBSD-src-efc8c660fa5674795a86179feb8a34d1ee62831d.zip
FreeBSD-src-efc8c660fa5674795a86179feb8a34d1ee62831d.tar.gz
Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs to
mute -Wunused-but-set-variable warnings with gcc dealing with the function calls X-MFC with: r290847 MFC after: 1 week Reported by: gcc Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/debug.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/contrib/netbsd-tests/lib/libc/regex/debug.c b/contrib/netbsd-tests/lib/libc/regex/debug.c
index fd2e467..3fc6d5b 100644
--- a/contrib/netbsd-tests/lib/libc/regex/debug.c
+++ b/contrib/netbsd-tests/lib/libc/regex/debug.c
@@ -45,16 +45,18 @@
#include "test_regex.h"
+#ifdef __NetBSD__
static void s_print(struct re_guts *, FILE *);
static char *regchar(int);
+#endif
+#ifdef __NetBSD__
/*
* regprint - print a regexp for debugging
*/
void
regprint(regex_t *r, FILE *d)
{
-#ifdef __NetBSD__
struct re_guts *g = r->re_g;
int c;
int last;
@@ -116,7 +118,6 @@ regprint(regex_t *r, FILE *d)
}
fprintf(d, "\n");
}
-#endif
}
/*
@@ -126,15 +127,11 @@ static void
s_print(struct re_guts *g, FILE *d)
{
sop *s;
-#ifdef __NetBSD__
cset *cs;
-#endif
int done = 0;
sop opnd;
int col = 0;
-#ifdef __NetBSD__
ssize_t last;
-#endif
sopno offset = 2;
# define GAP() { if (offset % 5 == 0) { \
if (col > 40) { \
@@ -181,7 +178,6 @@ s_print(struct re_guts *g, FILE *d)
break;
case OANYOF:
fprintf(d, "[(%ld)", (long)opnd);
-#ifdef __NetBSD__
cs = &g->sets[opnd];
last = -1;
for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */
@@ -198,7 +194,6 @@ s_print(struct re_guts *g, FILE *d)
last = -1;
}
}
-#endif
fprintf(d, "]");
break;
case OBACK_:
@@ -254,11 +249,7 @@ s_print(struct re_guts *g, FILE *d)
fprintf(d, ">");
break;
default:
-#ifdef __FreeBSD__
- fprintf(d, "!%ld(%ld)!", OP(*s), opnd);
-#else
fprintf(d, "!%d(%d)!", OP(*s), opnd);
-#endif
break;
}
if (!done)
@@ -280,3 +271,10 @@ regchar(int ch)
sprintf(buf, "\\%o", ch);
return(buf);
}
+#else
+void
+regprint(regex_t *r, FILE *d)
+{
+
+}
+#endif
OpenPOWER on IntegriCloud