Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning GCC and Clang : Empty lines : %option '-L' #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flex/src/buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
const char *src;
size_t tsz;

if (gen_line_dirs)
return buf;
if (!gen_line_dirs)
return buf;

tsz = strlen("#line \"\"\n") + /* constant parts */
2 * strlen (filename) + /* filename with possibly all backslashes escaped */
Expand Down
6 changes: 3 additions & 3 deletions flex/src/skel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,8 +1651,8 @@ const char *skel[] = {
" /* Create the reject buffer large enough to save one state per allowed character. */",
" if ( ! YY_G(yy_state_buf) )",
" YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG);",
" if ( ! YY_G(yy_state_buf) )",
" YY_FATAL_ERROR( \"out of dynamic memory in yylex()\" );",
" if ( ! YY_G(yy_state_buf) )",
" YY_FATAL_ERROR( \"out of dynamic memory in yylex()\" );",
"]])",
"",
" if ( ! YY_G(yy_start) )",
Expand Down Expand Up @@ -2181,7 +2181,7 @@ const char *skel[] = {
"%% [17.0] code to find the next state, and perhaps do backing up, goes here",
"",
" M4_YY_NOOP_GUTS_VAR();",
" return yy_is_jam ? 0 : yy_current_state;",
"return yy_is_jam ? 0 : yy_current_state;",
"}",
"",
"",
Expand Down