From owner-svn-src-all@freebsd.org Sun Nov 15 18:49:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15A51A30331; Sun, 15 Nov 2015 18:49:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7DE913C2; Sun, 15 Nov 2015 18:49:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAFInVct056757; Sun, 15 Nov 2015 18:49:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFInVO7056756; Sun, 15 Nov 2015 18:49:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511151849.tAFInVO7056756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 15 Nov 2015 18:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290869 - head/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2015 18:49:33 -0000 Author: ngie Date: Sun Nov 15 18:49:31 2015 New Revision: 290869 URL: https://svnweb.freebsd.org/changeset/base/290869 Log: 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 Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Nov 15 18:45:04 2015 (r290868) +++ head/contrib/netbsd-tests/lib/libc/regex/debug.c Sun Nov 15 18:49:31 2015 (r290869) @@ -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