mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings - ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources - ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma - OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file - PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned - Other places: some casts added to avoid warnings
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
%option yywrap
|
||||
%{
|
||||
#include <ExprIntrp.tab.h>
|
||||
|
||||
#define YY_SKIP_YYWRAP
|
||||
|
||||
static YY_BUFFER_STATE ExprIntrp_bufstring;
|
||||
@@ -29,6 +30,8 @@ static YY_BUFFER_STATE ExprIntrp_bufstring;
|
||||
void ExprIntrp_SetResult();
|
||||
void ExprIntrp_SetDegree();
|
||||
|
||||
int ExprIntrlex (void);
|
||||
|
||||
void ExprIntrp_start_string(char* str)
|
||||
{
|
||||
ExprIntrp_bufstring = ExprIntrp_scan_string(str);
|
||||
@@ -45,6 +48,11 @@ int yywrap()
|
||||
return 1;
|
||||
}
|
||||
|
||||
// disable MSVC warnings in flex code
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4131 4244 4273 4127)
|
||||
#endif
|
||||
|
||||
%}
|
||||
%%
|
||||
" " {;}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,15 @@ extern void ExprIntrp_Sumator();
|
||||
extern void ExprIntrp_VariableIdentifier();
|
||||
extern void ExprIntrp_Productor();
|
||||
extern void ExprIntrp_EndOfEqual();
|
||||
|
||||
extern void ExprIntrperror(char* msg);
|
||||
extern int ExprIntrplex(void);
|
||||
|
||||
// disable MSVC warnings in bison code
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4131 4244)
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%token SUMOP MINUSOP DIVIDEOP EXPOP MULTOP PARENTHESIS BRACKET ENDPARENTHESIS ENDBRACKET VALUE IDENTIFIER COMMA DIFFERENTIAL DERIVATE DERIVKEY ASSIGNOP DEASSIGNKEY EQUALOP RELSEPARATOR CONSTKEY SUMKEY PRODKEY
|
||||
|
@@ -1,77 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
proc ExprIntrp_Replace:AdmFileType {} {
|
||||
return "dbadmfile";
|
||||
}
|
||||
|
||||
proc ExprIntrp_Replace:OutputDirTypeName {} {
|
||||
return "dbtmpfile";
|
||||
}
|
||||
|
||||
|
||||
proc ExprIntrp_Replace:HandleInputFile { ID } {
|
||||
|
||||
scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
|
||||
|
||||
switch $name {
|
||||
ExprIntrp.tab.c {return 1;}
|
||||
default {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc ExprIntrp_Replace:Execute { unit args } {
|
||||
|
||||
msgprint -i -c "ExprIntrp_Replace::Execute" "Copying of ExprIntrp includes $unit $args "
|
||||
|
||||
global tcl_interactive
|
||||
|
||||
set tcl_interactive 1
|
||||
package require Wokutils
|
||||
|
||||
|
||||
if { [wokparam -e %Station $unit] != "wnt" } {
|
||||
set copycmd "cp -p "
|
||||
set replstr "/"
|
||||
} else {
|
||||
set copycmd "cmd /c copy"
|
||||
set replstr "\\\\\\\\"
|
||||
}
|
||||
|
||||
|
||||
set sourcename ExprIntrp.tab.c
|
||||
set name ExprIntrp.tab.c
|
||||
|
||||
set source [woklocate -p ExprIntrp:source:$sourcename [wokinfo -N $unit]]
|
||||
set vistarget [woklocate -p ExprIntrp:privinclude [wokinfo -N $unit]]$name
|
||||
# set target [wokinfo -p ExprIntrp:privinclude:$name [wokinfo -N $unit]]
|
||||
msgprint -i -c "$source "
|
||||
regsub -all "/" " $source $vistarget" $replstr TheArgs
|
||||
|
||||
msgprint -i -c "ExprIntrp_Replace::Execute" "Copy $source to $vistarget"
|
||||
if { [file exist $vistarget] && [wokparam -e %Station ] != "wnt" } {
|
||||
eval exec "chmod u+w $vistarget"
|
||||
}
|
||||
eval exec "$copycmd $TheArgs"
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,30 +0,0 @@
|
||||
-- Created on: 2000-06-29
|
||||
-- Created by: Atelier CAS2000
|
||||
-- Copyright (c) 2000-2012 OPEN CASCADE SAS
|
||||
--
|
||||
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||
-- except in compliance with the License. Please obtain a copy of the License
|
||||
-- at http://www.opencascade.org and read it completely before using this file.
|
||||
--
|
||||
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
--
|
||||
-- The Original Code and all software distributed under the License is
|
||||
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
-- Initial Developer hereby disclaims all such warranties, including without
|
||||
-- limitation, any warranties of merchantability, fitness for a particular
|
||||
-- purpose or non-infringement. Please see the License for the specific terms
|
||||
-- and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
@ifnotdefined ( %ExprIntrp_WOKSteps_EDL) then
|
||||
@set %ExprIntrp_WOKSteps_EDL = "";
|
||||
|
||||
--- Insert your stuff Here
|
||||
|
||||
@set %CASCADESamplesJni_WOKSteps_EDL = "";
|
||||
@string %WOKSteps_XcppGroup += "xcpp.repl";
|
||||
@set %WOKSteps_xcpp_repl = "*ExprIntrp_Replace(xcpp.header)";
|
||||
|
||||
@endif;
|
@@ -39,7 +39,7 @@ extern "C" void ExprIntrp_SetResult()
|
||||
|
||||
extern "C" void ExprIntrp_SetDegree()
|
||||
{
|
||||
ExprIntrp_degree = strlen(ExprIntrptext);
|
||||
ExprIntrp_degree = (int)strlen(ExprIntrptext);
|
||||
}
|
||||
|
||||
int ExprIntrp_GetDegree()
|
||||
@@ -50,5 +50,5 @@ int ExprIntrp_GetDegree()
|
||||
int ExprIntrp_GetResult(char *s)
|
||||
{
|
||||
strcpy(s,ExprIntrp_curres);
|
||||
return strlen(ExprIntrp_curres);
|
||||
return (int)strlen(ExprIntrp_curres);
|
||||
}
|
||||
|
@@ -1,10 +1,7 @@
|
||||
ExprIntrp_CMPLRS.edl
|
||||
ExprIntrp_WOKSteps.edl
|
||||
ExprIntrp.lex
|
||||
ExprIntrp.yacc
|
||||
ExprIntrp_yaccanal.hxx
|
||||
ExprIntrp_yaccintrf.cxx
|
||||
ExprIntrp_yaccintrf.hxx
|
||||
ExprIntrp_yacclex.cxx
|
||||
ExprIntrp_Replace.tcl
|
||||
ExprIntrp.tab.c
|
||||
|
Reference in New Issue
Block a user