]> OCCT Git - occt-copy.git/commitdiff
Get rid of warnings. CR31481
authorika <ika@opencascade.com>
Wed, 26 Aug 2020 15:29:38 +0000 (18:29 +0300)
committerika <ika@opencascade.com>
Fri, 28 Aug 2020 12:39:57 +0000 (15:39 +0300)
Move own include in RW source, according to code rules.
Update list of already generated entities.

src/ExpToCasExe/expparse.cxx
src/ExpToCasExe/expscan.cxx
src/ExpToCasExe/exptocas.h
src/ExpToCasExe/occt_step_entities.lst
src/Express/Express_Entity.cxx

index fc7b1f3a87ed93ca2d2aebbb342484d6b00af6d3..2b289643e7c580347a7dfaafa9088d41dddec5db 100644 (file)
@@ -71,16 +71,19 @@ complex time or redefinition of inherited field are ignored.
 #if defined(__clang__)
 #pragma GCC diagnostic ignored "-Wmissing-braces"
 #endif
+#if __cplusplus > 199711L
+#define register// Deprecated in C++11.
+#endif
 
 /************************************************/
 /* ERROR MESSAGE FUNCTION                       */
 
 /* external functions (from Express.l) */
-int ec_error ( char *s, char *text );
+int ec_error ( char const *s, char const *text );
 int ec_curline ( void );
 
 #define yyerror ec_error
-void ec_error ( char *s )
+void ec_error ( char const *s )
 {
   printf ( "\nParse error at line %d: %s\n", ec_curline(), s );
 }
@@ -1286,7 +1289,7 @@ case 52:
 { yyval.field = mkfield ( yypvt[-4].str, yypvt[-1].type, yypvt[-2].num ); } break;
 case 53:
 # line 242 "Express.y"
-{ yyval.num = NULL; printf ( "Warning at line %d: field redefinition ignored\n", ec_curline() ); /* redefinition of inherited field */ } break;
+{ yyval.num = 0; printf ( "Warning at line %d: field redefinition ignored\n", ec_curline() ); /* redefinition of inherited field */ } break;
 case 54:
 # line 244 "Express.y"
 { yyval.tlist = mktlist ( yypvt[-0].str, 0 ); /* inherited field specification */ } break;
index a6cbd11aa95a60e3a9a02f8a84f259e63b57f329..14b934bf268bdda65c3e4264566cec6e9e033708 100644 (file)
@@ -20,6 +20,9 @@
 #if defined(__clang__)
 #pragma GCC diagnostic ignored "-Wmissing-braces"
 #endif
+#if __cplusplus > 199711L
+#define register// Deprecated in C++11.
+#endif
 
 # define U(x) x
 # define NLSTATE yyprevious=YYNEWLINE
@@ -186,7 +189,7 @@ int ec_curline ( void )
   return ec_linenum;
 }
 
-int ec_error ( char *s, char *text )
+int ec_error ( char const *s, char const *text )
 {
   printf ( "\nError at line %d: %s \"%s\"\n", ec_curline(), s, text );
   return 0;
@@ -210,7 +213,7 @@ int ec_error ( char *s, char *text )
 /* parsing rules                    */
 # define YYNEWLINE 10
 int yylex(){
-int nstr; extern int yyprevious;
+int nstr = 0; extern int yyprevious;
 #ifdef __cplusplus
 /* to avoid CC and lint complaining yyfussy not being used ...*/
 static int __lex_hack = 0;
index 66003e0ca631c80a88ae610c8dd0776d3727866b..26d783fb8d6bb5931d10059e1b6bcbf3a988237a 100644 (file)
@@ -101,7 +101,7 @@ struct ec_type *mktset     ( int keyword, int ilow, int ihigh, struct ec_type *o
 struct ec_field *mkfield   ( char *name, struct ec_type *type, int optional );
 
 /* Error reporting functions */
-int ec_error ( char *s, char *text );
+int ec_error ( char const *s, char const *text );
 int ec_curline ( void );
 
 /* Access to result of parsing */
index d7ddbbb5058abdb90e716da398d51f6f1ccf0643..0472a225837331ad6313620863c397feac7f8221 100644 (file)
@@ -778,3 +778,7 @@ TessellatedItem StepVisual
 TessellatedGeometricSet StepVisual
 TessellatedCurveSet StepVisual
 CoordinatesList StepVisual
+SurfaceStyleTransparent StepVisual
+SurfaceStyleReflectanceAmbient StepVisual
+SurfaceStyleRendering StepVisual
+SurfaceStyleRenderingWithProperties StepVisual
index 81cf6b256fc565340182e3e490eb1bceb73c5183..f507f4bfc6790c34bda36fee49b5f46f13e2337e 100644 (file)
@@ -427,13 +427,13 @@ Standard_Boolean Express_Entity::GenerateClass () const
   Express::WriteFileStamp ( os );
 
   // write include section
-  os << "#include <Interface_EntityIterator.hxx>" << std::endl;
-  os << "#include <StepData_StepReaderData.hxx>" << std::endl;
-  os << "#include <StepData_StepWriter.hxx>" << std::endl;
   os << "#include <" << RWCPPName->ToCString() << ".hxx>" << std::endl;
   dict.Clear();
   os << "#include <" << CPPname->ToCString() << ".hxx>" << std::endl;
   dict.Bind(CPPname->ToCString(), 1);
+  os << "#include <Interface_EntityIterator.hxx>" << std::endl;
+  os << "#include <StepData_StepReaderData.hxx>" << std::endl;
+  os << "#include <StepData_StepWriter.hxx>" << std::endl;
   WriteRWInclude ( os, dict );
   // write constructor
   Express::WriteMethodStamp ( os, RWCPPName );