summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceStorm/Scanner.cpp')
-rw-r--r--cpp/src/IceStorm/Scanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp
index e6e81e808f6..1c8eac2dd7e 100644
--- a/cpp/src/IceStorm/Scanner.cpp
+++ b/cpp/src/IceStorm/Scanner.cpp
@@ -610,7 +610,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -621,7 +621,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \