From owner-svn-src-head@FreeBSD.ORG Tue May 21 19:17:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BFF99F23; Tue, 21 May 2013 19:17:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A29BE7F7; Tue, 21 May 2013 19:17:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4LJH4St020445; Tue, 21 May 2013 19:17:04 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4LJH2xg020432; Tue, 21 May 2013 19:17:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201305211917.r4LJH2xg020432@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 21 May 2013 19:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250875 - head/contrib/flex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 19:17:04 -0000 Author: jkim Date: Tue May 21 19:17:02 2013 New Revision: 250875 URL: http://svnweb.freebsd.org/changeset/base/250875 Log: Reduce compiler warnings. Modified: head/contrib/flex/buf.c head/contrib/flex/filter.c head/contrib/flex/flex.skl head/contrib/flex/flexint.h head/contrib/flex/gen.c head/contrib/flex/libyywrap.c head/contrib/flex/main.c head/contrib/flex/misc.c head/contrib/flex/scanflags.c Modified: head/contrib/flex/buf.c ============================================================================== --- head/contrib/flex/buf.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/buf.c Tue May 21 19:17:02 2013 (r250875) @@ -90,7 +90,8 @@ struct Buf *buf_prints (struct Buf *buf, */ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno) { - char *dst, *src, *t; + char *dst, *t; + const char *src; t = flex_alloc (strlen ("#line \"\"\n") + /* constant parts */ 2 * strlen (filename) + /* filename with possibly all backslashes escaped */ Modified: head/contrib/flex/filter.c ============================================================================== --- head/contrib/flex/filter.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/filter.c Tue May 21 19:17:02 2013 (r250875) @@ -135,9 +135,6 @@ struct filter *filter_create_int (struct bool filter_apply_chain (struct filter * chain) { int pid, pipes[2]; - int r; - const int readsz = 512; - char *buf; /* Tricky recursion, since we want to begin the chain Modified: head/contrib/flex/flex.skl ============================================================================== --- head/contrib/flex/flex.skl Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/flex.skl Tue May 21 19:17:02 2013 (r250875) @@ -196,7 +196,11 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], /* First, we deal with platform-specific or compiler-specific issues. */ #if defined(__FreeBSD__) +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif #include +#include #else #define __dead2 #endif Modified: head/contrib/flex/flexint.h ============================================================================== --- head/contrib/flex/flexint.h Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/flexint.h Tue May 21 19:17:02 2013 (r250875) @@ -5,7 +5,8 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#if defined(__FreeBSD__) || \ + (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. Modified: head/contrib/flex/gen.c ============================================================================== --- head/contrib/flex/gen.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/gen.c Tue May 21 19:17:02 2013 (r250875) @@ -121,7 +121,7 @@ static struct yytbl_data *mkeoltbl (void } /* Generate the table for possible eol matches. */ -static void geneoltbl () +static void geneoltbl (void) { int i; @@ -431,7 +431,7 @@ void genctbl () /* mkecstbl - Make equivalence-class tables. */ -struct yytbl_data *mkecstbl (void) +static struct yytbl_data *mkecstbl (void) { int i; struct yytbl_data *tbl = 0; Modified: head/contrib/flex/libyywrap.c ============================================================================== --- head/contrib/flex/libyywrap.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/libyywrap.c Tue May 21 19:17:02 2013 (r250875) @@ -21,6 +21,7 @@ /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */ /* PURPOSE. */ +int yywrap (void); int yywrap (void) { return 1; Modified: head/contrib/flex/main.c ============================================================================== --- head/contrib/flex/main.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/main.c Tue May 21 19:17:02 2013 (r250875) @@ -1575,11 +1575,12 @@ void readin () } if (!do_yywrap) { - if (!C_plus_plus) + if (!C_plus_plus) { if (reentrant) outn ("\n#define yywrap(yyscanner) 1"); else outn ("\n#define yywrap() 1"); + } outn ("#define YY_SKIP_YYWRAP"); } Modified: head/contrib/flex/misc.c ============================================================================== --- head/contrib/flex/misc.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/misc.c Tue May 21 19:17:02 2013 (r250875) @@ -113,6 +113,7 @@ void action_define (defname, value) } +#ifdef notdef /** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer. * @param defname The macro name. * @param value The macro value, can be NULL, which is the same as the empty string. @@ -133,6 +134,7 @@ void action_m4_define (const char *defna snprintf (buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, value?value:""); add_action (buf); } +#endif /* Append "new_text" to the running buffer. */ void add_action (new_text) Modified: head/contrib/flex/scanflags.c ============================================================================== --- head/contrib/flex/scanflags.c Tue May 21 19:11:11 2013 (r250874) +++ head/contrib/flex/scanflags.c Tue May 21 19:17:02 2013 (r250875) @@ -62,7 +62,7 @@ sf_init (void) _sf_stk = (scanflags_t*) flex_alloc ( sizeof(scanflags_t) * (_sf_max = 32)); if (!_sf_stk) lerrsf_fatal(_("Unable to allocate %ld of stack"), - (long)sizeof(scanflags_t)); + (void *)(uintptr_t)sizeof(scanflags_t)); _sf_stk[_sf_top_ix] = 0; }