]> OCCT Git - occt-copy.git/commitdiff
# Get rid of warnings
authorika <ika@opencascade.com>
Mon, 20 Apr 2020 10:09:26 +0000 (13:09 +0300)
committerika <ika@opencascade.com>
Mon, 24 Aug 2020 12:00:50 +0000 (15:00 +0300)
22 files changed:
src/ExpToCasExe/ExpToCasExe.cxx
src/ExpToCasExe/expparse.cxx
src/ExpToCasExe/expparse.h
src/ExpToCasExe/expscan.cxx
src/ExpToCasExe/exptocas.h
src/ExpToCasExe/exptocas.l
src/ExpToCasExe/exptocas.y
src/ExpToCasExe/lex.yy.c
src/Express/Express_Alias.hxx
src/Express/Express_Boolean.hxx
src/Express/Express_ComplexType.hxx
src/Express/Express_Entity.cxx
src/Express/Express_Entity.hxx
src/Express/Express_Enum.hxx
src/Express/Express_Integer.hxx
src/Express/Express_Logical.hxx
src/Express/Express_NamedType.hxx
src/Express/Express_PredefinedType.hxx
src/Express/Express_Real.hxx
src/Express/Express_Reference.hxx
src/Express/Express_Select.hxx
src/Express/Express_String.hxx

index 3eead1ccf73edc369e33f77c6bd6e9c7896bf2ad..a717fc0ffc9e9b943896519b94e1b961a7b176d7 100644 (file)
@@ -1,7 +1,17 @@
-// File:       ExpToCasExe.cxx
 // Created:    Mon Nov  1 12:50:27 1999
 // Author:     Andrey BETENEV
-//             <abv@nordox.nnov.matra-dtv.fr>
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <string.h>
 #include <ctype.h>
 #include <Express_Schema.hxx>
 #include <Express_Item.hxx>
 
+#ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning (disable:4267)
 #pragma warning (disable:4706)
+#endif
 
 Handle(Express_Schema) ec_parse ( FILE *fin ); // interface to parser
 
@@ -205,5 +217,6 @@ Standard_Integer main ( const Standard_Integer argc, const char *argv[] )
 //  std::cout << "Finished; total " << nbgen << " classes generated" << std::endl;
   return 1;
 }
-
+#ifdef _MSC_VER
 #pragma warning(pop)
+#endif
index 20d5abfca41110ece6012ed5d544a1f10fbc42e4..08ee5cc5e70c95bf294645de36e624927f6ad14e 100644 (file)
@@ -1,11 +1,20 @@
 
 # line 2 "Express.y"
 
-/* File:       Express.y                     */
-/* Created:    Thu Oct 28 12:21:16 1999       */
-/* Author:     Andrey BETENEV                 */
-/*             <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright:  Matra Datavision 1999          */
+// Created:    Thu Oct 28 12:21:16 1999
+// Author:     Andrey BETENEV
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 /*****************************************************************************\
 
@@ -53,10 +62,15 @@ complex time or redefinition of inherited field are ignored.
 #include <Express_Reference.hxx>
 #include <Express.hxx>
 
+#ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4244)
 #pragma warning(disable:4274)
 #pragma warning(disable:4800)
+#endif
+#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#endif
 
 /************************************************/
 /* ERROR MESSAGE FUNCTION                       */
@@ -605,8 +619,6 @@ char * yyreds[] =
  * Copyright (c) 1993 by Sun Microsystems, Inc.
  */
 
-#pragma ident  "@(#)yaccpar    6.14    97/01/16 SMI"
-
 /*
 ** Skeleton parser driver for yacc output
 */
@@ -1319,4 +1331,6 @@ case 66:
        goto yystack;           /* reset registers in driver code */
 }
 
+#ifdef _MSC_VER
 #pragma warning(pop)
+#endif
index e6cd7d62b2aa72489250654349940906d598cb24..d506fce8115c2ef3fb67c3ea1da2a762d8b37f0f 100644 (file)
@@ -1,3 +1,17 @@
+// Created:    Mon Nov  1 12:50:27 1999
+// Author:     Andrey BETENEV
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 typedef union
 #ifdef __cplusplus
index 6274344bf5ebcfaed30867180e15238c73f53b38..3f570a41a77dbc380c2c6f20d8f8d9d56af7f832 100644 (file)
@@ -1,5 +1,25 @@
+// Created:    Mon Nov  1 12:50:27 1999
+// Author:     Andrey BETENEV
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 #include <stdio.h>
 #include <stdlib.h>
+
+#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#endif
+
 # define U(x) x
 # define NLSTATE yyprevious=YYNEWLINE
 # define BEGIN yybgin = yysvec + 1 +
@@ -80,11 +100,18 @@ struct yysvf {
 struct yysvf *yyestate;
 extern struct yysvf yysvec[], *yybgin;
 
+#ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning (disable:4244)
 #pragma warning (disable:4274)
 #pragma warning (disable:4706)
 #pragma warning (disable:4701)
+#endif
+
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wwrite-strings"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
 
 # line 4 "exptocas.l"
 /* File:       exptocas.l                     */
@@ -2656,8 +2683,6 @@ char yyextra[] = {
 /*     The copyright notice above does not evidence any        */
 /*     actual or intended publication of such source code.     */
 
-#pragma ident  "@(#)ncform     6.11    97/01/06 SMI"
-
 int yylineno =1;
 # define YYU(x) x
 # define NLSTATE yyprevious=YYNEWLINE
@@ -2916,4 +2941,6 @@ yyunput(c)
        unput(c);
        }
 
+#ifdef _MSC_VER
 #pragma warning(pop)
+#endif
index 385a582ccb6fc0df455928543a1621eb1949a44f..66003e0ca631c80a88ae610c8dd0776d3727866b 100644 (file)
@@ -1,3 +1,18 @@
+// Created:    Mon Nov  1 12:50:27 1999
+// Author:     Andrey BETENEV
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 #ifndef EXPCAS_H
 #define EXPCAS_H
 
index 1360f89bcc4b70ca656aae5d4be74f11bf4f30c4..1c3ee41b98887ce7b3809ec40878bbb50f48268c 100644 (file)
@@ -1,10 +1,19 @@
 %{
 
-/* File:       exptocas.l                     */
-/* Created:    Thu Oct 28 12:21:16 1999       */
-/* Author:     Andrey BETENEV                 */
-/*             <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright:  Matra Datavision 1999          */
+/* Created:    Thu Oct 28 12:21:16 1999
+/* Author:     Andrey BETENEV
+/* Copyright (c) 1999-2020 OPEN CASCADE SAS
+/*
+/* This file is part of Open CASCADE Technology software library.
+/*
+/* This library is free software; you can redistribute it and/or modify it under
+/* the terms of the GNU Lesser General Public License version 2.1 as published
+/* by the Free Software Foundation, with special exception defined in the file
+/* OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+/* distribution for complete text of the license and disclaimer of any warranty.
+/*
+/* Alternatively, this file may be used under the terms of Open CASCADE
+/* commercial license or contractual agreement.
 
 /*****************************************************************************\
 
index efdc9fe358ea46efb91bcfa91b52c0937856d68d..d50b61ec5cda757d0ab231c950518c7923432082 100644 (file)
@@ -1,10 +1,19 @@
 %{
 
-/* File:       exptocas.y                     */
-/* Created:    Thu Oct 28 12:21:16 1999       */
-/* Author:     Andrey BETENEV                 */
-/*             <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright:  Matra Datavision 1999          */
+/* Created:    Thu Oct 28 12:21:16 1999
+/* Author:     Andrey BETENEV
+/* Copyright (c) 1999-2020 OPEN CASCADE SAS
+/*
+/* This file is part of Open CASCADE Technology software library.
+/*
+/* This library is free software; you can redistribute it and/or modify it under
+/* the terms of the GNU Lesser General Public License version 2.1 as published
+/* by the Free Software Foundation, with special exception defined in the file
+/* OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+/* distribution for complete text of the license and disclaimer of any warranty.
+/*
+/* Alternatively, this file may be used under the terms of Open CASCADE
+/* commercial license or contractual agreement.
 
 /*****************************************************************************\
 
index ed53260bf77a31094d95cac71144241284d4380f..4e9b828d2c70525cad34ec3b70b50d134bca8b12 100644 (file)
@@ -1,3 +1,18 @@
+// Created:    Mon Nov  1 12:50:27 1999
+// Author:     Andrey BETENEV
+// Copyright (c) 1999-2020 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
 #include <stdio.h>
 #include <stdlib.h>
 # define U(x) x
index 5ee19a76a7bcc53ecd89410b63af6b80b885836e..3498604d6dc7b98e0ae20f4fcc977c0933a0791c 100644 (file)
@@ -36,10 +36,10 @@ public:
   Standard_EXPORT  const  Handle(Express_Type)& Type()  const;
   
   //! Returns name of aliased type
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
   //! Create HXX/CXX files from item
-  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const;
+  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const Standard_OVERRIDE;
 
 
 
index b2961a7f1680f841e5eb289431a4551ee435d6ee..f97d8461564ad36b0c32ea06f4277db9ce5aa836 100644 (file)
@@ -31,7 +31,7 @@ public:
   Standard_EXPORT Express_Boolean();
   
   //! Returns "Standard_Boolean"
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
 
 
index 9f2aeb046d4d4f98bbc99116cbb89249ff86c6bd..e002575d38e147a67d9a1a258b3e900a00a79ce1 100644 (file)
@@ -37,11 +37,11 @@ public:
   Standard_EXPORT  const  Handle(Express_Type)& Type()  const;
   
   //! Returns CPP-style name of the type
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
   //! Declares type as used by some item being generated.
   //! Calls Use() for type of elements
-  Standard_EXPORT virtual   Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False)  const;
+  Standard_EXPORT virtual   Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False)  const Standard_OVERRIDE;
 
 
 
index 39075cf84712f5a62fbef33ea49803d5e5341a59..81cf6b256fc565340182e3e490eb1bceb73c5183 100644 (file)
@@ -1174,13 +1174,7 @@ Standard_Integer Express_Entity::MakeInit (Standard_OStream &os,
     }
     
     // write field
-    if ( mode == 0 ) {
-      if (field->Type()->IsHandle())
-        os << "const Handle(" << field->Type()->CPPName()->ToCString() << ")& the" << varName->ToCString();
-      else
-        os << "const " << field->Type()->CPPName()->ToCString() << " the" << varName->ToCString();
-    }
-    else if (mode == 1) {
+    if ( mode == 0 || mode ==1) {
       os << "const " << (field->Type()->IsHandle() ? "Handle(" : "") <<
         field->Type()->CPPName()->ToCString() << (field->Type()->IsHandle() ? ")" : "") <<
         (field->Type()->IsSimple() ? " the" : "& the") << varName->ToCString();
index 34d1be8db6dddef8825189d141643823a7382b66..20ba8d24250ea37472667bf084e634a2c1d616b1 100644 (file)
@@ -73,7 +73,7 @@ private:
   typedef NCollection_DataMap<TCollection_AsciiString,Standard_Integer,TCollection_AsciiString> DataMapOfStringInteger;
   
   //! Create HXX/CXX files from item
-  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const;
+  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const Standard_OVERRIDE;
   
   //! Writes includes section of HXX
   Standard_EXPORT   Standard_Boolean WriteIncludes (Standard_OStream& os, DataMapOfStringInteger& dict)  const;
index 8663e3c23f947b41da66e1673acfa8f891f8c280..fde36c480819c743934f02664688eca0419bfb53 100644 (file)
@@ -35,7 +35,7 @@ public:
   Standard_EXPORT  const  Handle(TColStd_HSequenceOfHAsciiString)& Names()  const;
   
   //! Create HXX/CXX files from item
-  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const;
+  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const Standard_OVERRIDE;
 
 
 
index 1d03027f790a5a2371f02e35839edc4b631fcca6..0490b5e1ea77085d85581d08b505f3375255e54f 100644 (file)
@@ -31,7 +31,7 @@ public:
   Standard_EXPORT Express_Integer();
   
   //! Returns "Standard_Integer"
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
 
 
index 8cc9d6f4aaa86ad4b7396cb0a1d65acfd70214b9..01fb3c5a7c80a2db2053b364c4c0cadd8876de99 100644 (file)
@@ -32,16 +32,16 @@ public:
   Standard_EXPORT Express_Logical();
   
   //! Returns "StepData_Logical"
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
   //! Return False
-  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const Standard_OVERRIDE;
   
   //! Return False
-  Standard_EXPORT virtual   Standard_Boolean IsSimple()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsSimple()  const Standard_OVERRIDE;
   
   //! Return False
-  Standard_EXPORT virtual   Standard_Boolean IsHandle()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsHandle()  const Standard_OVERRIDE;
 
 
 
index 8ec8cb6bec67417579d73b9ad6984897e4975aa0..e43daf05416e937a258e1cf55b662db9bd9b8cce 100644 (file)
@@ -47,20 +47,20 @@ public:
   Standard_EXPORT   void SetItem (const Handle(Express_Item)& it) ;
   
   //! Returns CPP-style name of the type
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
   //! Return True if type is defined in package Standard
-  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const Standard_OVERRIDE;
   
   //! Return True if type is simple (not a class)
-  Standard_EXPORT virtual   Standard_Boolean IsSimple()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsSimple()  const Standard_OVERRIDE;
   
   //! Return True if type is inherited from Transient
-  Standard_EXPORT virtual   Standard_Boolean IsHandle()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsHandle()  const Standard_OVERRIDE;
   
   //! Declares type as used by some item being generated.
   //! Calls Use() for referred item (found by name).
-  Standard_EXPORT virtual   Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False)  const;
+  Standard_EXPORT virtual   Standard_Boolean Use(const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False)  const Standard_OVERRIDE;
 
 
 
index 98e06c00664207d345216fb1bfcae94e6191d19f..7f59a926edc8d61763adea31b395ed7d7575688b 100644 (file)
@@ -27,7 +27,7 @@ public:
 
   
   //! Returns True
-  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const Standard_OVERRIDE;
 
 
 
index ec2654d11c677b2c3e74f5bf7d7702e645e1ad4f..1d8deae96d777df969a00d07c99aaca9359a361f 100644 (file)
@@ -31,7 +31,7 @@ public:
   Standard_EXPORT Express_Real();
   
   //! Returns "Standard_Real"
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
 
 
index 7adefbfe5d5263ce37132eb037907c561ab856b9..a0856e3062b2d403efa69e3b4dc33254da4077bf 100644 (file)
@@ -42,7 +42,7 @@ public:
   
   //! Redefined to empty (in order to be able to instantiate)
   //! Returna False
-  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const;
+  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const Standard_OVERRIDE;
 
 
 
index 708261c4b5af5b94d432a260d95d75cdf28924df..3113c13694953ad2f22bc8b66000a7d371dc55d1 100644 (file)
@@ -42,7 +42,7 @@ public:
   Standard_EXPORT  const  Handle(Express_HSequenceOfItem)& Items()  const;
   
   //! Create HXX/CXX files from item
-  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const;
+  Standard_EXPORT virtual   Standard_Boolean GenerateClass()  const Standard_OVERRIDE;
 
 
 
index 6351ef45e577f49a2c214c647d7831f65ae55e8d..09c2af920ed33eb631f0a6b2c937a8e84b1b7153 100644 (file)
@@ -32,10 +32,10 @@ public:
   Standard_EXPORT Express_String();
   
   //! Returns "Handle(TCollection_HAsciiString)"
-  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const;
+  Standard_EXPORT virtual   Handle(TCollection_HAsciiString) CPPName()  const Standard_OVERRIDE;
   
   //! Returns False
-  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const;
+  Standard_EXPORT virtual   Standard_Boolean IsStandard()  const Standard_OVERRIDE;