aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-04 23:33:07 +0000
committerrowanbeentje <rowan@beent.je>2011-03-04 23:33:07 +0000
commit3ad653d83d064413051c48da6e4c40f4f979f870 (patch)
tree63075d8b46f51c2e1c9865111c0f854d651ceb8d /Source
parent09a49199cd951f2bb8947c7853d357ae53fb51de (diff)
downloadsequelpro-3ad653d83d064413051c48da6e4c40f4f979f870.tar.gz
sequelpro-3ad653d83d064413051c48da6e4c40f4f979f870.tar.bz2
sequelpro-3ad653d83d064413051c48da6e4c40f4f979f870.zip
Fix compiler warnings related to flex and derived sources
Diffstat (limited to 'Source')
-rw-r--r--Source/SPEditorTokens.l3
-rw-r--r--Source/SPSQLTokenizer.l5
2 files changed, 3 insertions, 5 deletions
diff --git a/Source/SPEditorTokens.l b/Source/SPEditorTokens.l
index 7b19804a..67491351 100644
--- a/Source/SPEditorTokens.l
+++ b/Source/SPEditorTokens.l
@@ -41,12 +41,11 @@
size_t utf8strlen(const char * _s);
size_t yyuoffset, yyuleng;
-#define YY_NO_UNPUT
-
//keep track of the current utf-8 character (not byte) offset and token length
#define YY_USER_ACTION { yyuoffset += yyuleng; yyuleng = utf8strlen(yytext); }
%}
%option noyywrap
+%option nounput
%option case-insensitive
s [ \t\n\r]+
diff --git a/Source/SPSQLTokenizer.l b/Source/SPSQLTokenizer.l
index 61fb3b8a..1964c94d 100644
--- a/Source/SPSQLTokenizer.l
+++ b/Source/SPSQLTokenizer.l
@@ -29,8 +29,6 @@
int utf8strlenfortoken(const char * _s);
int yyuoffset, yyuleng;
-#define YY_NO_UNPUT
-
//keep track of the current utf-8 character (not byte) offset and token length
#define YY_USER_ACTION { yyuoffset += yyuleng; yyuleng = utf8strlenfortoken(yytext); }
//ignore the output of unmatched characters
@@ -38,6 +36,7 @@ int yyuoffset, yyuleng;
%}
%option prefix="to"
%option noyywrap
+%option nounput
%option case-insensitive
%option nostdinit
@@ -135,5 +134,5 @@ int utf8strlenfortoken(const char * _s)
}
done:
- return ((s - _s) - count);
+ return (int)((s - _s) - count);
}