svn commit: r250468 - projects/flex-sf/contrib/flex
Jung-uk Kim
jkim at FreeBSD.org
Fri May 10 18:41:15 UTC 2013
Author: jkim
Date: Fri May 10 18:41:14 2013
New Revision: 250468
URL: http://svnweb.freebsd.org/changeset/base/250468
Log:
Fix some compiler warnings for Clang.
Modified:
projects/flex-sf/contrib/flex/buf.c
projects/flex-sf/contrib/flex/filter.c
projects/flex-sf/contrib/flex/flex.skl
projects/flex-sf/contrib/flex/gen.c
projects/flex-sf/contrib/flex/main.c
projects/flex-sf/contrib/flex/misc.c
Modified: projects/flex-sf/contrib/flex/buf.c
==============================================================================
--- projects/flex-sf/contrib/flex/buf.c Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/buf.c Fri May 10 18:41:14 2013 (r250468)
@@ -98,7 +98,7 @@ struct Buf *buf_linedir (struct Buf *buf
1); /* NUL */
if (!t)
flexfatal (_("Allocation of buffer for line directive failed"));
- for (dst = t + sprintf (t, "#line %d \"", lineno), src = filename; *src; *dst++ = *src++)
+ for (dst = t + sprintf (t, "#line %d \"", lineno), src = (char *)filename; *src; *dst++ = *src++)
if (*src == '\\') /* escape backslashes */
*dst++ = '\\';
*dst++ = '"';
Modified: projects/flex-sf/contrib/flex/filter.c
==============================================================================
--- projects/flex-sf/contrib/flex/filter.c Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/filter.c Fri May 10 18:41:14 2013 (r250468)
@@ -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: projects/flex-sf/contrib/flex/flex.skl
==============================================================================
--- projects/flex-sf/contrib/flex/flex.skl Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/flex.skl Fri May 10 18:41:14 2013 (r250468)
@@ -196,6 +196,9 @@ 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 <sys/cdefs.h>
#else
#define __dead2
@@ -203,6 +206,7 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
/* begin standard C headers. */
%if-c-only
+#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
Modified: projects/flex-sf/contrib/flex/gen.c
==============================================================================
--- projects/flex-sf/contrib/flex/gen.c Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/gen.c Fri May 10 18:41:14 2013 (r250468)
@@ -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: projects/flex-sf/contrib/flex/main.c
==============================================================================
--- projects/flex-sf/contrib/flex/main.c Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/main.c Fri May 10 18:41:14 2013 (r250468)
@@ -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: projects/flex-sf/contrib/flex/misc.c
==============================================================================
--- projects/flex-sf/contrib/flex/misc.c Fri May 10 18:36:54 2013 (r250467)
+++ projects/flex-sf/contrib/flex/misc.c Fri May 10 18:41:14 2013 (r250468)
@@ -117,7 +117,7 @@ void action_define (defname, value)
* @param defname The macro name.
* @param value The macro value, can be NULL, which is the same as the empty string.
*/
-void action_m4_define (const char *defname, const char * value)
+static void action_m4_define (const char *defname, const char * value)
{
char buf[MAXLINE];
More information about the svn-src-projects
mailing list