Skip to content

Commit

Permalink
Fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dpasukhi committed Dec 26, 2024
1 parent 81dc7d0 commit 0213d51
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
4 changes: 2 additions & 2 deletions adm/cmake/occt_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR)
set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}")
# choose appropriate extension for generated files: "cxx" if source file contains
# instruction to generate C++ code, "c" otherwise
set (BISON_OUTPUT_FILE_EXT "c")
set (FLEX_OUTPUT_FILE_EXT "c")
set (BISON_OUTPUT_FILE_EXT "cxx")
set (FLEX_OUTPUT_FILE_EXT "cxx")
file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT)
foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT})
string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE})
Expand Down
5 changes: 0 additions & 5 deletions src/ExprIntrp/ExprIntrp_yacclex.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
static TCollection_AsciiString ExprIntrp_curres;
static int ExprIntrp_degree;

#ifndef _WIN32
extern char* ExprIntrptext;
#else
char* ExprIntrptext;
#endif // _WIN32


void ExprIntrp_SetResult()
{
Expand Down
47 changes: 0 additions & 47 deletions src/ExprIntrp/lex.ExprIntrp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,6 @@ static int yyinput ( void );
#define YY_EXIT_FAILURE 2
#endif

static void yynoreturn yypanic (const char* msg ) {
fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}

/* Report a fatal error. Legacy interface. */
#ifndef YY_FATAL_ERROR

Expand Down Expand Up @@ -1717,48 +1712,6 @@ yy_is_jam = (yy_current_state == YY_JAMSTATE);
return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_YYUNPUT
static void yyunput_r (int c, char * yy_bp )

{
char *yy_cp;

yy_cp = (yy_c_buf_p);

/* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);

if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
/* need to shift things up to make room */
/* +2 for EOB chars. */
int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) {
*--dest = *--source;
}
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;

if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
}

*--yy_cp = (char) c;

(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}

#endif /* ifndef YY_NO_YYINPUT */

#ifndef YY_NO_YYINPUT
int yyinput (void)

Expand Down

0 comments on commit 0213d51

Please sign in to comment.