]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Get rid of compilation warnings. Part I.
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Thu, 14 May 2020 12:39:41 +0000 (15:39 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Fri, 15 May 2020 11:36:20 +0000 (14:36 +0300)
127 files changed:
src/BuildPlugin/BuildPlugin_SubShapes.cpp
src/BuildPlugin/BuildPlugin_Validators.cpp
src/CollectionPlugin/CollectionPlugin_Group.cpp
src/Config/Config_Keywords.h
src/ConstructionPlugin/ConstructionPlugin_Plane.cpp
src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/ConstructionPlugin/ConstructionPlugin_Validators.cpp
src/Events/Events_Loop.cpp
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_Import.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportPart.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp
src/FeaturesPlugin/FeaturesPlugin_Tools.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/FiltersPlugin/FiltersPlugin_OnPlane.cpp
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_Shell.cpp
src/GeomAPI/GeomAPI_Solid.cpp
src/GeomAPI/GeomAPI_Tools.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp
src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.cpp
src/GeomValidators/GeomValidators_ShapeType.cpp
src/GeomValidators/GeomValidators_ZeroOffset.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_BodyBuilder.cpp
src/Model/Model_Document.cpp
src/Model/Model_Objects.cpp
src/Model/Model_Objects.h
src/Model/Model_ResultConstruction.cpp
src/Model/Model_ResultField.cpp
src/Model/Model_ResultPart.cpp
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_Events.h
src/ModelAPI/ModelAPI_Feature.h
src/ModelAPI/ModelAPI_FiltersFactory.h
src/ModelAPI/ModelAPI_Validator.h
src/ModelGeomAlgo/ModelGeomAlgo_Point2D.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.h
src/ModelHighAPI/ModelHighAPI_Selection.cpp
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModuleBase/ModuleBase_IPropertyPanel.cpp
src/ModuleBase/ModuleBase_ISelection.h
src/ModuleBase/ModuleBase_ISelectionActivate.h
src/ModuleBase/ModuleBase_IconFactory.h
src/ModuleBase/ModuleBase_LabelValue.cpp
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_OperationFeature.cpp
src/ModuleBase/ModuleBase_PagedContainer.cpp
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
src/ModuleBase/ModuleBase_Preferences.cpp
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_ToolBox.cpp
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_ViewerFilters.cpp
src/ModuleBase/ModuleBase_ViewerPrs.cpp
src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp
src/ModuleBase/ModuleBase_WidgetFeatureSelector.cpp
src/ModuleBase/ModuleBase_WidgetLabel.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetOptionalBox.cpp
src/ModuleBase/ModuleBase_WidgetSwitch.cpp
src/ModuleBase/ModuleBase_WidgetValidated.cpp
src/ModuleBase/ModuleBase_WidgetValidator.cpp
src/ParametersPlugin/ParametersPlugin_EvalListener.cpp
src/ParametersPlugin/ParametersPlugin_Parameter.cpp
src/PartSet/PartSet_BSplineWidget.cpp
src/PartSet/PartSet_CustomPrs.h
src/PartSet/PartSet_FieldStepPrs.cpp
src/PartSet/PartSet_IconFactory.cpp
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherReentrantMgr.cpp
src/PartSet/PartSet_Validators.cpp
src/PartSet/PartSet_WidgetBSplinePoints.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Box.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Torus.cpp
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI_DataModel.cpp
src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp
src/Selector/Selector_Algo.h
src/Selector/Selector_Container.cpp
src/Selector/Selector_FilterByNeighbors.cpp
src/Selector/Selector_Intersect.cpp
src/SketchPlugin/SketchPlugin_Constraint.h
src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp
src/SketchPlugin/SketchPlugin_Fillet.cpp
src/SketchPlugin/SketchPlugin_MacroCircle.cpp
src/SketchPlugin/SketchPlugin_Tools.cpp
src/SketchPlugin/SketchPlugin_Trim.cpp
src/SketchPlugin/SketchPlugin_Validators.cpp
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_PositionMgr.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/XGUI/XGUI.h
src/XGUI/XGUI_ActiveControlMgr.cpp
src/XGUI/XGUI_ColorDialog.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_ErrorMgr.cpp
src/XGUI/XGUI_FacesPanel.cpp
src/XGUI/XGUI_HistoryMenu.cpp
src/XGUI/XGUI_InspectionPanel.cpp
src/XGUI/XGUI_InspectionPanel.h
src/XGUI/XGUI_MenuMgr.cpp
src/XGUI/XGUI_ModuleConnector.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_PropertyPanel.h
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_SelectionActivate.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_WorkshopListener.cpp

index b23458fa37f8877da9f0be80f68360e30cf1e45f..02c481b1d183cab96f8f56c27711c3340c63f167 100644 (file)
@@ -122,8 +122,6 @@ void BuildPlugin_SubShapes::execute()
   }
 
   // Store result.
-  const int aModVertexTag = 1;
-  const int aModEdgeTag = 2;
   ResultBodyPtr aResultBody = document()->createBody(data());
   aResultBody->storeModified(aBaseShape, aResultShape);
   aResultBody->loadModifiedShapes(aBuilder, aBaseShape, GeomAPI_Shape::EDGE);
index 0a3776babc5f5ac145ae0ece927eca7f3f3f544b..78f8e6c9d7960d9b2b2ddc1442c8e8945c1d24b3 100644 (file)
@@ -243,7 +243,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
     }
     GeomShapePtr aSectedEdges = aPaveFiller.shape();
 
-    int anEdgesNum = 0;
+    size_t anEdgesNum = 0;
     for(GeomAPI_ShapeExplorer
         anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
       anEdgesNum++;
index 2a083360ea5270ebf1b52a2b4591e70f49068dca..aa57838cdd051ba284c3c8e06d1e6714c3687701 100644 (file)
@@ -142,9 +142,9 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
           }
         }
       }
-      if (aFatherGroup.size() < aList->size() && aFatherGroup.size() != 1)  // already good
+      if (aFatherGroup.size() < (size_t)aList->size() && aFatherGroup.size() != 1)  // already good
         break;
-      if (aFatherGroup.size() == aList->size()) // no sence to iterate further
+      if (aFatherGroup.size() == (size_t)aList->size()) // no sence to iterate further
         break;
       if (aFatherGroup.size() == 1 && aList->size() > 1 && aCurrentDepth == aMinDepth)
         aSplitAnyway = true;  // split anyway, better that just move
@@ -152,7 +152,6 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
 
     std::set<int> aRemoved;
     bool aStay = false; // to indicate that the good attribute found stays in the list
-    int anIndex = 1; // index of the name assigned to group-feature and result
     // added in the order: 3 2 1 orig=0, so, keep the results to give names later
     std::list<FeaturePtr> aResults;
     for(int aNext = aList->size() - 1; aNext >= 0; aNext--) {
@@ -171,7 +170,7 @@ bool CollectionPlugin_Group::customAction(const std::string& theActionId)
 
       aRemoved.insert(aNext);
       FeaturePtr aNew;
-      if (aSplitAnyway || aFGroup > aResults.size()) {
+      if (aSplitAnyway || aFGroup > (int)aResults.size()) {
         aNew = aDoc->addFeature(ID(), false);
         aResults.push_front(aNew); // to keep the order
       } else { // appending in already created new result
index 6254f286e1ac3f956fb5c5962badba83d951677e..bbba6b2d7ae16ec84a41ab717943ae6e5bec2399 100644 (file)
 #ifndef CONFIG_KEYWORDS_H_
 #define CONFIG_KEYWORDS_H_
 
+#if defined __GNUC__ || defined __clang__
+#define MAYBE_UNUSED __attribute__((unused))
+#else
+#define MAYBE_UNUSED
+#endif
+
 /*
  * Hardcoded xml entities of plugin-*.xml
  */
-const static char* NODE_WORKBENCH = "workbench";
-const static char* NODE_GROUP = "group";
-const static char* NODE_FEATURE = "feature";
-const static char* NODE_SOURCE = "source";
-const static char* NODE_VALIDATOR = "validator";
-const static char* NODE_XMLPARENT = "libxml_parent";
+MAYBE_UNUSED const static char* NODE_WORKBENCH = "workbench";
+MAYBE_UNUSED const static char* NODE_GROUP = "group";
+MAYBE_UNUSED const static char* NODE_FEATURE = "feature";
+MAYBE_UNUSED const static char* NODE_SOURCE = "source";
+MAYBE_UNUSED const static char* NODE_VALIDATOR = "validator";
+MAYBE_UNUSED const static char* NODE_XMLPARENT = "libxml_parent";
 
 // Property panels
-const static char* PROPERTY_PANEL_ID = "property_panel_id";
+MAYBE_UNUSED const static char* PROPERTY_PANEL_ID = "property_panel_id";
 
 // Widgets
-const static char* WDG_INFO = "label";
-const static char* WDG_UNDOLABEL = "undo_label";
-const static char* WDG_DOUBLEVALUE = "doublevalue";
-const static char* WDG_DOUBLEVALUELABEL = "labelvalue";
-const static char* WDG_INTEGERVALUE = "integervalue";
-const static char* WDG_BOOLVALUE = "boolvalue";
-const static char* WDG_STRINGVALUE = "stringvalue";
-const static char* WDG_NAMEVALUE = "namevalue";
-const static char* WDG_MULTISELECTOR = "multi_selector";
-const static char* WDG_SHAPE_SELECTOR = "shape_selector";
-const static char* WDG_FEATURE_SELECTOR = "feature_selector";
-const static char* WDG_CONCEALED_OBJECTS_VIEW = "concealed_objects_view";
-const static char* WDG_CHOICE = "choice";
-const static char* WDG_DOUBLEVALUE_EDITOR = "doublevalue_editor";
-const static char* WDG_FILE_SELECTOR= "file_selector";
-const static char* WDG_EXPR_EDITOR = "expr_editor";
-const static char* WDG_PLACE_HOLDER = "placeholder";
-const static char* WDG_ACTION = "action";
-const static char* WDG_POINT_INPUT = "point_input";
-const static char* WDG_SELECTION_FILTERS = "selection_filters";
+MAYBE_UNUSED const static char* WDG_INFO = "label";
+MAYBE_UNUSED const static char* WDG_UNDOLABEL = "undo_label";
+MAYBE_UNUSED const static char* WDG_DOUBLEVALUE = "doublevalue";
+MAYBE_UNUSED const static char* WDG_DOUBLEVALUELABEL = "labelvalue";
+MAYBE_UNUSED const static char* WDG_INTEGERVALUE = "integervalue";
+MAYBE_UNUSED const static char* WDG_BOOLVALUE = "boolvalue";
+MAYBE_UNUSED const static char* WDG_STRINGVALUE = "stringvalue";
+MAYBE_UNUSED const static char* WDG_NAMEVALUE = "namevalue";
+MAYBE_UNUSED const static char* WDG_MULTISELECTOR = "multi_selector";
+MAYBE_UNUSED const static char* WDG_SHAPE_SELECTOR = "shape_selector";
+MAYBE_UNUSED const static char* WDG_FEATURE_SELECTOR = "feature_selector";
+MAYBE_UNUSED const static char* WDG_CONCEALED_OBJECTS_VIEW = "concealed_objects_view";
+MAYBE_UNUSED const static char* WDG_CHOICE = "choice";
+MAYBE_UNUSED const static char* WDG_DOUBLEVALUE_EDITOR = "doublevalue_editor";
+MAYBE_UNUSED const static char* WDG_FILE_SELECTOR= "file_selector";
+MAYBE_UNUSED const static char* WDG_EXPR_EDITOR = "expr_editor";
+MAYBE_UNUSED const static char* WDG_PLACE_HOLDER = "placeholder";
+MAYBE_UNUSED const static char* WDG_ACTION = "action";
+MAYBE_UNUSED const static char* WDG_POINT_INPUT = "point_input";
+MAYBE_UNUSED const static char* WDG_SELECTION_FILTERS = "selection_filters";
 
 // Containers
-const static char* WDG_GROUP = "groupbox";
-const static char* WDG_OPTIONALBOX = "optionalbox";
-const static char* WDG_TOOLBOX = "toolbox";
-const static char* WDG_RADIOBOX = "radiobox";
-const static char* WDG_RADIOBOX_ITEM = "radio";
-const static char* WDG_TOOLBOX_BOX = "box";
-const static char* WDG_SWITCH = "switch";
-const static char* WDG_SWITCH_CASE = "case";
-const static char* WDG_FILTER = "filter";
+MAYBE_UNUSED const static char* WDG_GROUP = "groupbox";
+MAYBE_UNUSED const static char* WDG_OPTIONALBOX = "optionalbox";
+MAYBE_UNUSED const static char* WDG_TOOLBOX = "toolbox";
+MAYBE_UNUSED const static char* WDG_RADIOBOX = "radiobox";
+MAYBE_UNUSED const static char* WDG_RADIOBOX_ITEM = "radio";
+MAYBE_UNUSED const static char* WDG_TOOLBOX_BOX = "box";
+MAYBE_UNUSED const static char* WDG_SWITCH = "switch";
+MAYBE_UNUSED const static char* WDG_SWITCH_CASE = "case";
+MAYBE_UNUSED const static char* WDG_FILTER = "filter";
 
 // Common properties (xml attributes of nodes)
-const static char* _ID = "id";
+MAYBE_UNUSED const static char* _ID = "id";
 // NODE_WORKBENCH properties
-const static char* WORKBENCH_DOC = "document";
+MAYBE_UNUSED const static char* WORKBENCH_DOC = "document";
 // NODE_SOURCE properties
-const static char* SOURCE_FILE = "path";
+MAYBE_UNUSED const static char* SOURCE_FILE = "path";
 // NODE_FEATURE properties
-const static char* FEATURE_TOOLTIP = "tooltip";
-const static char* GROUP_TOOLBAR = "toolbar";
-const static char* FEATURE_ICON = "icon";
-const static char* FEATURE_TEXT = "title";
-const static char* HELP_FILE = "helpfile";
-const static char* ABORT_CONFIRMATION = "abort_confirmation";
-const static char* HIDEFACES_PANEL = "hidefaces_panel";
-const static char* FEATURE_KEYSEQUENCE = "keysequence";
-const static char* FEATURE_NESTED = "nested";
-const static char* FEATURE_WHEN_NESTED = "when_nested";
-const static char* FEATURE_WHEN_NESTED_ACCEPT = "accept";
-const static char* FEATURE_WHEN_NESTED_ABORT = "abort";
-const static char* FEATURE_DOC = WORKBENCH_DOC;
-const static char* FEATURE_MODAL = "modal";
-const static char* FEATURE_APPLY_CONTINUE = "apply_continue";
-const static char* FEATURE_AUTO_PREVIEW = "auto_preview";
-const static char* FEATURE_TITLE_IN_TOOLBAR = "titleInToolbar";
+MAYBE_UNUSED const static char* FEATURE_TOOLTIP = "tooltip";
+MAYBE_UNUSED const static char* GROUP_TOOLBAR = "toolbar";
+MAYBE_UNUSED const static char* FEATURE_ICON = "icon";
+MAYBE_UNUSED const static char* FEATURE_TEXT = "title";
+MAYBE_UNUSED const static char* HELP_FILE = "helpfile";
+MAYBE_UNUSED const static char* ABORT_CONFIRMATION = "abort_confirmation";
+MAYBE_UNUSED const static char* HIDEFACES_PANEL = "hidefaces_panel";
+MAYBE_UNUSED const static char* FEATURE_KEYSEQUENCE = "keysequence";
+MAYBE_UNUSED const static char* FEATURE_NESTED = "nested";
+MAYBE_UNUSED const static char* FEATURE_WHEN_NESTED = "when_nested";
+MAYBE_UNUSED const static char* FEATURE_WHEN_NESTED_ACCEPT = "accept";
+MAYBE_UNUSED const static char* FEATURE_WHEN_NESTED_ABORT = "abort";
+MAYBE_UNUSED const static char* FEATURE_DOC = WORKBENCH_DOC;
+MAYBE_UNUSED const static char* FEATURE_MODAL = "modal";
+MAYBE_UNUSED const static char* FEATURE_APPLY_CONTINUE = "apply_continue";
+MAYBE_UNUSED const static char* FEATURE_AUTO_PREVIEW = "auto_preview";
+MAYBE_UNUSED const static char* FEATURE_TITLE_IN_TOOLBAR = "titleInToolbar";
 // NODE_VALIDATOR properties
-const static char* _PARAMETERS = "parameters";
+MAYBE_UNUSED const static char* _PARAMETERS = "parameters";
 
 // Widget (attribute) properties
-const static char* ATTR_TOOLTIP = FEATURE_TOOLTIP;
-const static char* ATTR_ICON = FEATURE_ICON;
-const static char* ATTR_LABEL = "label";
-const static char* ATTR_STYLE_SHEET = "styleSheet";
-const static char* ATTR_HTML_STYLE = "isHTML";
-const static char* ATTR_DEFAULT = "default";
-const static char* ATTR_INTERNAL = "internal";
-const static char* ATTR_OBLIGATORY = "obligatory";
-const static char* ATTR_CONCEALMENT = "concealment";
-const static char* ATTR_USE_RESET = "use_reset";
-const static char* ATTR_GREED = "greed";
-const static char* ATTR_MODIFIED_IN_EDIT = "modified_in_edit";
-const static char* ATTR_MAIN_ARG = "main_argument";
-const static char* ATTR_GEOMETRICAL_SELECTION = "geometrical_selection";
-const static char* ATTR_VISUAL_CHANGED = "change_visual_attributes";
+MAYBE_UNUSED const static char* ATTR_TOOLTIP = FEATURE_TOOLTIP;
+MAYBE_UNUSED const static char* ATTR_ICON = FEATURE_ICON;
+MAYBE_UNUSED const static char* ATTR_LABEL = "label";
+MAYBE_UNUSED const static char* ATTR_STYLE_SHEET = "styleSheet";
+MAYBE_UNUSED const static char* ATTR_HTML_STYLE = "isHTML";
+MAYBE_UNUSED const static char* ATTR_DEFAULT = "default";
+MAYBE_UNUSED const static char* ATTR_INTERNAL = "internal";
+MAYBE_UNUSED const static char* ATTR_OBLIGATORY = "obligatory";
+MAYBE_UNUSED const static char* ATTR_CONCEALMENT = "concealment";
+MAYBE_UNUSED const static char* ATTR_USE_RESET = "use_reset";
+MAYBE_UNUSED const static char* ATTR_GREED = "greed";
+MAYBE_UNUSED const static char* ATTR_MODIFIED_IN_EDIT = "modified_in_edit";
+MAYBE_UNUSED const static char* ATTR_MAIN_ARG = "main_argument";
+MAYBE_UNUSED const static char* ATTR_GEOMETRICAL_SELECTION = "geometrical_selection";
+MAYBE_UNUSED const static char* ATTR_VISUAL_CHANGED = "change_visual_attributes";
 
 
 // WDG_INFO properties
-const static char* INFO_WDG_TEXT = FEATURE_TEXT;
-const static char* INFO_WDG_TOOLTIP = FEATURE_TOOLTIP;
+MAYBE_UNUSED const static char* INFO_WDG_TEXT = FEATURE_TEXT;
+MAYBE_UNUSED const static char* INFO_WDG_TOOLTIP = FEATURE_TOOLTIP;
 // WDG_DOUBLEVALUE properties:
-const static char* DOUBLE_WDG_MIN = "min";
-const static char* DOUBLE_WDG_MAX = "max";
-const static char* DOUBLE_WDG_STEP = "step";
-const static char* DOUBLE_WDG_DEFAULT_COMPUTED = "computed";
-const static char* DOUBLE_WDG_ACCEPT_EXPRESSIONS = "accept_expressions";
-const static char* DOUBLE_WDG_ENABLE_VALUE = "enable_value";
+MAYBE_UNUSED const static char* DOUBLE_WDG_MIN = "min";
+MAYBE_UNUSED const static char* DOUBLE_WDG_MAX = "max";
+MAYBE_UNUSED const static char* DOUBLE_WDG_STEP = "step";
+MAYBE_UNUSED const static char* DOUBLE_WDG_DEFAULT_COMPUTED = "computed";
+MAYBE_UNUSED const static char* DOUBLE_WDG_ACCEPT_EXPRESSIONS = "accept_expressions";
+MAYBE_UNUSED const static char* DOUBLE_WDG_ENABLE_VALUE = "enable_value";
 
-const static char* DOUBLE_WDG_ENABLE_VALUE_BY_PREFERENCES = "enable_by_preferences";
+MAYBE_UNUSED const static char* DOUBLE_WDG_ENABLE_VALUE_BY_PREFERENCES = "enable_by_preferences";
 
 // WDG_TOOLBOX/WDG_SWITCH properties
-const static char* CONTAINER_PAGE_NAME = "title";
-const static char* CONTAINER_PAGE_ICON = "icon";
+MAYBE_UNUSED const static char* CONTAINER_PAGE_NAME = "title";
+MAYBE_UNUSED const static char* CONTAINER_PAGE_ICON = "icon";
 
 /*
  * Hardcoded xml entities of plugins.xml
  */
 
-const static char* PLUGIN_FILE = "plugins.xml";
-const static char* NODE_PLUGIN = "plugin";
-const static char* NODE_PLUGINS = "plugins";
+MAYBE_UNUSED const static char* PLUGIN_FILE = "plugins.xml";
+MAYBE_UNUSED const static char* NODE_PLUGIN = "plugin";
+MAYBE_UNUSED const static char* NODE_PLUGINS = "plugins";
 
-const static char* PLUGINS_MODULE = "module";
-const static char* PLUGIN_CONFIG = "configuration";
-const static char* PLUGIN_LIBRARY = "library";
-const static char* PLUGIN_SCRIPT = "script";
-const static char* PLUGIN_DEPENDENCY = "dependency";
-const static char* PLUGIN_USES = "uses";
+MAYBE_UNUSED const static char* PLUGINS_MODULE = "module";
+MAYBE_UNUSED const static char* PLUGIN_CONFIG = "configuration";
+MAYBE_UNUSED const static char* PLUGIN_LIBRARY = "library";
+MAYBE_UNUSED const static char* PLUGIN_SCRIPT = "script";
+MAYBE_UNUSED const static char* PLUGIN_DEPENDENCY = "dependency";
+MAYBE_UNUSED const static char* PLUGIN_USES = "uses";
 
 /*
  * Hardcoded xml entities of dataModel.xml
  */
-const static char* DATAMODEL_FILE = "dataModel.xml";
-const static char* NODE_FOLDER = "folder";
-const static char* FOLDER_NAME = "name";
-const static char* GROUP_TYPE = "group_type";
-const static char* ROOT_DOCUMENT = "root_document";
-const static char* SUB_DOCUMENT = "sub_document";
-const static char* NODE_ICON = "icon";
-const static char* SHOW_EMPTY = "show_empty";
-const static char* LINK_ITEM = "from_result";
-const static char* FOLDER_FEATURES = "folder_features";
+MAYBE_UNUSED const static char* DATAMODEL_FILE = "dataModel.xml";
+MAYBE_UNUSED const static char* NODE_FOLDER = "folder";
+MAYBE_UNUSED const static char* FOLDER_NAME = "name";
+MAYBE_UNUSED const static char* GROUP_TYPE = "group_type";
+MAYBE_UNUSED const static char* ROOT_DOCUMENT = "root_document";
+MAYBE_UNUSED const static char* SUB_DOCUMENT = "sub_document";
+MAYBE_UNUSED const static char* NODE_ICON = "icon";
+MAYBE_UNUSED const static char* SHOW_EMPTY = "show_empty";
+MAYBE_UNUSED const static char* LINK_ITEM = "from_result";
+MAYBE_UNUSED const static char* FOLDER_FEATURES = "folder_features";
 
 #endif /* CONFIG_KEYWORDS_H_ */
index 843af882aa051c9deaf5f27ba453f89e240d4f05..6863ee74c394587df9ef81c48be2f00120fe4a1c 100644 (file)
@@ -494,7 +494,8 @@ std::shared_ptr<GeomAPI_Face> makeRectangularFace(const std::shared_ptr<GeomAPI_
 
   // use all 8 points of the bounding box to find the 2D bounds
   bool isFirst = true;
-  double aMinX2d, aMaxX2d, aMinY2d, aMaxY2d;
+  double aMinX2d = DBL_MAX, aMaxX2d = -DBL_MAX;
+  double aMinY2d = DBL_MAX, aMaxY2d = -DBL_MAX;
   for(int aXIsMin = 0; aXIsMin < 2; aXIsMin++) {
     for(int aYIsMin = 0; aYIsMin < 2; aYIsMin++) {
       for(int aZIsMin = 0; aZIsMin < 2; aZIsMin++) {
index 7763b713673fba2e7d437287b09ef42e8994da49..d990b3f544eea33b6efb0b7da29de65ea3429286 100644 (file)
@@ -156,7 +156,7 @@ bool ConstructionPlugin_Point::customisePresentation(ResultPtr theResult,
   bool isCustomized = theDefaultPrs.get() != NULL &&
                       theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
   //thePrs->setPointMarker(1, 1.); // Set point as a '+' symbol
-  return true;
+  return isCustomized;
 }
 
 //==================================================================================================
index 16cb6708860b0c9b1b92617f1661bd2d1e6d993b..b36b2bd513f5ea04d340915aea2599359469d172 100644 (file)
@@ -136,14 +136,11 @@ bool ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel::isValid(
     aShape2 = aContext2->shape();
   }
 
-  bool isPlaneFirst = false;
   anEdge = getEdge(aShape1);
-
   aFace = getFace(aShape2);
   if(!anEdge.get() || !aFace.get()) {
     anEdge = getEdge(aShape2);
     aFace = getFace(aShape1);
-    isPlaneFirst = true;
   }
 
   if(!anEdge.get() || !aFace.get()) {
index c0934847c84fd4dcdbf9987983c3411e4fdaf913..b62b5694ae5f5216a9a120ed2ea9fffae34ce9c1 100644 (file)
@@ -200,9 +200,12 @@ void Events_Loop::flush(const Events_ID& theID)
       // TODO: Stabilization fix. Check later.
       if(myFlushed.find(theID.myID) != myFlushed.end()) {
         myFlushed.erase(myFlushed.find(theID.myID));
-      } else {
+      }
+#ifdef _DEBUG
+      else {
         bool aProblem = true;
       }
+#endif
     }
     // send accumulated messages to "groupListeners"
     std::map<char*, std::map<void*, std::list<Events_Listener*> > >::iterator aFindID =
index 2a6bfebe4d9da5792d375ee7ac8f25601c5e68cb..4253f2bb559d3467ad49ff6c8c956251ca99afca 100644 (file)
@@ -200,7 +200,7 @@ void ExchangePlugin_ExportFeature::exportFile(const std::string& theFileName,
     anError = "Unsupported format: " + aFormatName;
   }
 
-  if (!anError.empty()) {
+  if (!aResult || !anError.empty()) {
     setError("An error occurred while exporting " + theFileName + ": " + anError);
     return;
   }
index 0f40dacb98abcbe84aed94dd4513e855e6dff6d7..03ade55469eafea0cd9f0dd81ceebe345574b9eb 100644 (file)
@@ -138,7 +138,7 @@ void ExchangePlugin_Import::attributeChanged(const std::string& theID)
           anAcceptedValues.push_back((*aFIt)->name());
       }
 
-      if (aPartsAttr->size() != anAcceptedValues.size())
+      if ((size_t)aPartsAttr->size() != anAcceptedValues.size())
         aTargetAttr->setValue(0);
 
       aPartsAttr->setSize((int)anAcceptedValues.size());
index e4eaa0c95ca54dd51a7854c677315314c252bf7f..0b1c6cb95a31e86f889fb5e4dd5041274ab4d96b 100644 (file)
@@ -413,7 +413,6 @@ void ExchangePlugin_ImportFeature::loadNamingDS(
   //load result
   theResultBody->store(theGeomShape);
 
-  int aTag(1);
   std::string aNameMS = "Shape";
   theResultBody->loadFirstLevel(theGeomShape, aNameMS);
 }
index 0f8b06c0934cd8b944d8c9874ce99922a85d3448..e63d5ee9c0109b8265e43e291f243e405b21da8e 100644 (file)
@@ -105,7 +105,7 @@ void ExchangePlugin_ImportPart::attributeChanged(const std::string& theID)
           anAcceptedValues.push_back((*aFIt)->name());
       }
 
-      if (aPartsAttr->size() != anAcceptedValues.size())
+      if ((size_t)aPartsAttr->size() != anAcceptedValues.size())
         aTargetAttr->setValue(0);
 
       aPartsAttr->setSize((int)anAcceptedValues.size());
index 01b7f103fdef0991c449554393e4629f879132a9..2a3eed919a472b5cf595d19fed4f5940b288b053 100644 (file)
@@ -374,6 +374,8 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
       theMakeShapes.push_back(aMakeShapeList);
       break;
     }
+    default: // [to avoid compilation warnings]
+      break;
   }
 
   return true;
index 466cf712123db71370a4f78a1b405ecbbfa53f2c..f49aa97a85a457fbee12d6b3ed85dfb7ff672f6a 100644 (file)
@@ -177,13 +177,10 @@ void FeaturesPlugin_CompositeSketch::storeGenerationHistory(ResultBodyPtr theRes
     case GeomAPI_Shape::COMPOUND: {
       aShapeTypeToExplode = GeomAPI_Shape::COMPOUND;
     }
+    default: // [to avoid compilation warnings]
+      break;
   }
 
-  int aLateralIndex = 1;
-  int aBaseEdgeIndex = 1;
-  int aVertexIndex = 1;
-  int aBaseVertexIndex = 1;
-
   if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
     theResultBody->loadGeneratedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX);
@@ -252,6 +249,8 @@ void FeaturesPlugin_CompositeSketch::storeShapes(
       aShapeTypeToExplore = GeomAPI_Shape::COMPOUND;
       break;
     }
+    default: // [to avoid compilation warnings]
+      break;
   }
 
   // Store shapes.
index 5828351eff9ea6adfd5e9941684721f4b45a9f2e..be47490ad99760318c70c71c917308dae3719e51 100644 (file)
@@ -274,7 +274,7 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr<GeomAPI_Shape> theBa
 
   // Store generated edges/faces.
   GeomAPI_Shape::ShapeType aBaseShapeType = theBaseShape->shapeType();
-  GeomAPI_Shape::ShapeType aShapeTypeToExplode;
+  GeomAPI_Shape::ShapeType aShapeTypeToExplode = GeomAPI_Shape::SHAPE;
 
   switch(aBaseShapeType) {
     case GeomAPI_Shape::VERTEX: {
@@ -303,6 +303,8 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr<GeomAPI_Shape> theBa
     case GeomAPI_Shape::COMPOUND: {
       aShapeTypeToExplode = GeomAPI_Shape::COMPOUND;
     }
+    default:
+      return; // unsupported type of shape
   }
 
   if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX ||
@@ -344,7 +346,7 @@ void FeaturesPlugin_Pipe::storeResult(const ListOfShape& theBaseShapes,
   {
     GeomShapePtr aBaseShape = *anIter;
     GeomAPI_Shape::ShapeType aBaseShapeType = aBaseShape->shapeType();
-    GeomAPI_Shape::ShapeType aShapeTypeToExplode;
+    GeomAPI_Shape::ShapeType aShapeTypeToExplode = GeomAPI_Shape::SHAPE;
     switch(aBaseShapeType) {
       case GeomAPI_Shape::VERTEX: {
         aShapeTypeToExplode = GeomAPI_Shape::VERTEX;
@@ -367,6 +369,8 @@ void FeaturesPlugin_Pipe::storeResult(const ListOfShape& theBaseShapes,
         aShapeTypeToExplode = GeomAPI_Shape::EDGE;
         break;
       }
+      default:
+        return; // unsupported type of shape
     }
     aResultBody->loadGeneratedShapes(thePipeAlgo, aBaseShape, aShapeTypeToExplode);
   }
@@ -414,6 +418,8 @@ void FeaturesPlugin_Pipe::storeShapes(ResultBodyPtr theResultBody,
       aShapeTypeToExplore = GeomAPI_Shape::COMPOUND;
       break;
     }
+    default:
+      return; // unsupported type of shape
   }
 
   // Store shapes.
index c5f2f829d1135fb64864bd89901d508cba946818..7277bfe0f3c9327dbcf541b7aed1d0fd41618c1b 100644 (file)
@@ -92,6 +92,8 @@ void FeaturesPlugin_Tools::loadModifiedShapes(ResultBodyPtr theResultBody,
                                         GeomAPI_Shape::VERTEX,
                                         theName);
     }
+    default: // [to avoid compilation warning]
+      break;
   }
 }
 
index 37d1385dd3d9d520aed07d0ad5baa42cd1f698db..8b504ec4d59c59583db79faf64763db02d07cb40 100644 (file)
@@ -546,8 +546,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
 // LCOV_EXCL_STOP
   }
 
-  std::list<std::string>::const_iterator
-    anArgsIt = theArguments.begin(), aLast = theArguments.end();
+  std::list<std::string>::const_iterator anArgsIt = theArguments.begin();
 
   AttributePtr aCheckAttribute = theFeature->attribute(*anArgsIt);
   ++anArgsIt;
@@ -1135,7 +1134,6 @@ bool FeaturesPlugin_ValidatorUnionSelection::isValid(const AttributePtr& theAttr
   }
 
   for(int anIndex = 0; anIndex < aBaseObjectsAttrList->size(); ++anIndex) {
-    bool isSameFound = false;
     AttributeSelectionPtr anAttrSelectionInList = aBaseObjectsAttrList->value(anIndex);
     ResultPtr aContext = anAttrSelectionInList->context();
     if (!aContext.get()) {
@@ -1686,7 +1684,7 @@ bool FeaturesPlugin_ValidatorBooleanFuseArguments::isValid(
 
   int anObjectsNb = 0, aToolsNb = 0;
 
-  std::list<std::string>::const_iterator anIt = theArguments.begin(), aLast = theArguments.end();
+  std::list<std::string>::const_iterator anIt = theArguments.begin();
 
   bool isAllInSameCompSolid = true;
   ResultBodyPtr aCompSolid;
@@ -1737,8 +1735,6 @@ bool FeaturesPlugin_ValidatorBooleanFuseArguments::isValid(
     }
   }
 
-  anIt++;
-
   if (anObjectsNb + aToolsNb < 2) {
     theError = "Not enough arguments for Fuse operation.";
     return false;
@@ -1840,9 +1836,8 @@ bool FeaturesPlugin_ValidatorBooleanCommonArguments::isValid(
 
   int anObjectsNb = 0, aToolsNb = 0;
 
-  std::list<std::string>::const_iterator anIt = theArguments.begin(), aLast = theArguments.end();
+  std::list<std::string>::const_iterator anIt = theArguments.begin();
 
-  bool isAllInSameCompSolid = true;
   ResultBodyPtr aCompSolid;
 
   AttributeSelectionListPtr anAttrSelList = theFeature->selectionList(*anIt);
index a1ff1e50077ddd008aaf3524040479e75d3af51d..91634e9ad51e85e82b3d66008f95be77df4d281d 100644 (file)
@@ -41,6 +41,8 @@ bool FiltersPlugin_OnPlane::isSupported(GeomAPI_Shape::ShapeType theType) const
   case GeomAPI_Shape::EDGE:
   case GeomAPI_Shape::VERTEX:
     return true;
+  default: // [to avoid compilation warning]
+    break;
   }
   return false;
 }
index 3af9bb739e8d16d7fab7321d9d41bbef34c7e1bb..2fb3073a2c78a9e8523f96ce5786e6729044145a 100644 (file)
@@ -227,9 +227,9 @@ bool GeomAPI_Shape::isConnectedTopology() const
         // (if shapes are connected, vertices are connected for sure)
         TopExp_Explorer anExp2(aNewIter.Value(), TopAbs_VERTEX);
         for(; !aConnected && anExp2.More(); anExp2.Next()) {
-          NCollection_List<TopoDS_Shape>::Iterator aNotIter(aNotVertices);
-          for(; aNotIter.More(); aNotIter.Next()) {
-            if (aNotIter.Value().IsSame(anExp2.Current())) {
+          NCollection_List<TopoDS_Shape>::Iterator aNotVIter(aNotVertices);
+          for(; aNotVIter.More(); aNotVIter.Next()) {
+            if (aNotVIter.Value().IsSame(anExp2.Current())) {
               aConnected = true;
               break;
             }
@@ -551,8 +551,6 @@ GeomAPI_Shape::Orientation GeomAPI_Shape::orientation() const
 
 void GeomAPI_Shape::setOrientation(const GeomAPI_Shape::Orientation theOrientation)
 {
-  TopAbs_Orientation anOrientation = MY_SHAPE->Orientation();
-
   switch(theOrientation) {
     case FORWARD:  MY_SHAPE->Orientation(TopAbs_FORWARD);  break;
     case REVERSED: MY_SHAPE->Orientation(TopAbs_REVERSED); break;
index bbd4738043c248f46af22ce4ab9bd948d9fb5d41..dcd990372377abc9d6900b243e08bd2a742dc9a9 100644 (file)
@@ -97,8 +97,8 @@ std::shared_ptr<GeomAPI_Cylinder> GeomAPI_Shell::getCylinder() const
 
   GeomPointPtr aLocation;
   GeomDirPtr anAxis;
-  double aRadius;
-  double aHeight;
+  double aRadius = 0.0;
+  double aHeight = 0.0;
 
   for (TopExp_Explorer anExp(impl<TopoDS_Shape>(), TopAbs_FACE); anExp.More(); anExp.Next()) {
     GeomFacePtr aFace(new GeomAPI_Face);
@@ -175,8 +175,8 @@ std::shared_ptr<GeomAPI_Cone> GeomAPI_Shell::getCone() const
 
   GeomPointPtr anApex;
   GeomDirPtr anAxis;
-  double aSemiAngle, aTanSemiAngle;
-  double aHeight1, aHeight2;
+  double aSemiAngle = 0.0, aTanSemiAngle = 0.0;
+  double aHeight1 = 0.0, aHeight2 = 0.0;
 
   for (TopExp_Explorer anExp(impl<TopoDS_Shape>(), TopAbs_FACE); anExp.More(); anExp.Next()) {
     GeomFacePtr aFace(new GeomAPI_Face);
@@ -210,7 +210,7 @@ std::shared_ptr<GeomAPI_Cone> GeomAPI_Shell::getCone() const
 
       double aSign = anAxis->dot(aCurCone->axis());
       double aCurSemiAngle = aCurCone->semiAngle();
-      double aTanCurSemiAngle = Tan(aSemiAngle);
+      double aTanCurSemiAngle = Tan(aCurSemiAngle);
 
       double aH = aCurCone->radius1() / aTanCurSemiAngle * aSign;
       if (aH < aHeight1)
index da5513119921a395c417638aa3833e04fff8867a..9fb6d44fddcee97ded92129b24eb83bcfda51b92 100644 (file)
@@ -68,8 +68,8 @@ std::shared_ptr<GeomAPI_Cylinder> GeomAPI_Solid::getCylinder() const
 
   GeomPointPtr aLocation;
   GeomDirPtr anAxis;
-  double aRadius;
-  double aHeight;
+  double aRadius = 0.0;
+  double aHeight = 0.0;
 
   GeomPlanePtr aCaps[2];
 
@@ -173,8 +173,8 @@ std::shared_ptr<GeomAPI_Cone> GeomAPI_Solid::getCone() const
 
   GeomPointPtr anApex;
   GeomDirPtr anAxis;
-  double aSemiAngle;
-  double aHeight;
+  double aSemiAngle = 0.0;
+  double aHeight = 0.0;
 
   GeomPlanePtr aCaps[2];
 
index f0960376060f76848bc19da0004f7e23affb0f3e..863698110425d2bb2edd42629490f0eeee7b7502 100644 (file)
@@ -32,8 +32,6 @@ GeomShapePtr GeomAPI_Tools::getTypedShape(const GeomShapePtr& theShape)
 
   GeomShapePtr aTypedShape = theShape;
 
-  GeomAPI_Shape::ShapeType aType = theShape->shapeType();
-
   switch (theShape->shapeType()) {
   case GeomAPI_Shape::VERTEX:
     aTypedShape = GeomShapePtr(new GeomAPI_Vertex(theShape));
@@ -47,6 +45,8 @@ GeomShapePtr GeomAPI_Tools::getTypedShape(const GeomShapePtr& theShape)
   case GeomAPI_Shape::WIRE:
     aTypedShape = GeomShapePtr(new GeomAPI_Wire(theShape));
     break;
+  default:
+    break;
   }
 
   return aTypedShape;
index 5ee9d954430dd81b01e57fa3aac1387d2497d9ff..cc000fc2627b01c2e502b94e8deb339d58baecd3 100644 (file)
@@ -233,6 +233,8 @@ void GeomAlgoAPI_MakeShape::initialize()
       myShape->setImpl(new TopoDS_Shape(implPtr<BOPAlgo_Builder>()->Shape()));
       break;
     }
+    default:
+      break;
   }
 
   if(myMap.get()) {
index 6151984e2d034e39864afb64c5b420144ce7cce8..4d56201449ec8aa65189a5e2ccf9bc03043424b9 100644 (file)
@@ -84,7 +84,6 @@ void GeomAlgoAPI_Sewing::build(const ListOfShape& theShapes)
 void GeomAlgoAPI_Sewing::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
                                   ListOfShape& theHistory)
 {
-  static int anIndex = 0;
   if(!theShape.get()) {
     return;
   }
index d478adfa3ed8266a051414f82ce44e6e45986ebc..639e9aace82586e0a0505c7cc6eb1c9eda530eac 100644 (file)
@@ -276,7 +276,6 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
   NCollection_Vector<NCollection_Map<TopoDS_Shape>> aShapesWithCommonSubshapes;
   for(TopTools_IndexedDataMapOfShapeListOfShape::Iterator
       anIter(aMapSA); anIter.More(); anIter.Next()) {
-    const TopoDS_Shape& aShape = anIter.Key();
     TopTools_ListOfShape& aListOfShape = anIter.ChangeValue();
     if(aListOfShape.IsEmpty()) {
       continue;
@@ -598,7 +597,6 @@ std::list<std::shared_ptr<GeomAPI_Pnt> >
   Standard_Real aYArr[2] = {aBndBox.CornerMin().Y(), aBndBox.CornerMax().Y()};
   Standard_Real aZArr[2] = {aBndBox.CornerMin().Z(), aBndBox.CornerMax().Z()};
   std::list<std::shared_ptr<GeomAPI_Pnt> > aResultPoints;
-  int aNum = 0;
   for(int i = 0; i < 2; i++) {
     for(int j = 0; j < 2; j++) {
       for(int k = 0; k < 2; k++) {
@@ -1057,7 +1055,7 @@ static TopoDS_Wire fixParametricGaps(const TopoDS_Wire& theWire)
 {
   TopoDS_Wire aFixedWire;
   Handle(Geom_Curve) aPrevCurve;
-  double aPrevLastParam = 0.0;
+  double aPrevLastParam = -Precision::Infinite();
 
   BRep_Builder aBuilder;
   aBuilder.MakeWire(aFixedWire);
@@ -1067,7 +1065,7 @@ static TopoDS_Wire fixParametricGaps(const TopoDS_Wire& theWire)
     TopoDS_Edge anEdge = aWExp.Current();
     double aFirst, aLast;
     Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aFirst, aLast);
-    if (aCurve == aPrevCurve) {
+    if (aCurve == aPrevCurve && Abs(aFirst - aPrevLastParam) > Precision::Confusion()) {
       // if parametric gap occurs, create new edge based on the copied curve
       aCurve = Handle(Geom_Curve)::DownCast(aCurve->Copy());
       TopoDS_Vertex aV1, aV2;
index 21c6a9b4d4807f8d776107b9b89c60d3f9e7a6e5..3dea074087c2f90bdd6b94c8c231109257dc0b18 100644 (file)
@@ -153,7 +153,6 @@ bool GeomAlgoAPI_WireBuilder::isSelfIntersected(const GeomShapePtr& theWire)
   }
 
   // Check intersections between edges pair-wise
-  int aNbEdges = (int)anEdges.size();
   std::list<GeomShapePtr>::const_iterator anEdgesIt = anEdges.begin();
   for (int i = 0; anEdgesIt != anEdges.end(); ++anEdgesIt, i++) {
     GeomEdgePtr anEdge1(new GeomAPI_Edge(*anEdgesIt));
index 61e1a048bacf3a11d6530c1c839cc9b0c1eeda23..5b5fd026a674ebe4054bd91d782ad23d990eaab6 100644 (file)
@@ -81,11 +81,11 @@ std::string getShapeTypeDescription(const GeomValidators_ShapeType::TypeOfShape&
   if (MyShapeTypes.size() != 0) {
     std::map<std::string, GeomValidators_ShapeType::TypeOfShape>::const_iterator
       anIt = MyShapeTypes.begin(), aLast = MyShapeTypes.end();
-    for (; anIt != aLast; anIt++) {
-      if (anIt->second == theType)
+    for (; anIt != aLast; anIt++)
+      if (anIt->second == theType) {
         aValue = anIt->first;
         break;
-    }
+      }
   }
   return aValue;
 }
index 37cbd0c9a8c465c77673b43b2efa5c5b7dd62c1e..ff484ce856b2f6290afe5114becdc1431555f4f1 100644 (file)
@@ -46,7 +46,7 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
   }
 // LCOV_EXCL_STOP
 
-  std::list<std::string>::const_iterator anIt = theArguments.begin(), aLast = theArguments.end();
+  std::list<std::string>::const_iterator anIt = theArguments.begin();
 
   std::string aSelectedMethod;
   if(theFeature->string(*anIt)) {
index f3b094d6c3c01aa89990ea0eb203af0d1e278ed4..888f0c00a93b62cda1294380a5e6c2f719ea22ab 100644 (file)
@@ -146,8 +146,6 @@ bool Model_AttributeSelection::setValue(const ObjectPtr& theContext,
       isDegeneratedEdge = BRep_Tool::Degenerated(TopoDS::Edge(aSubShape)) == Standard_True;
   }
   if (!theContext.get() || isDegeneratedEdge) {
-    // to keep the reference attribute label
-    TDF_Label aRefLab = myRef.myRef->Label();
     aSelLab.ForgetAllAttributes(true);
     myRef.myRef = TDF_Reference::Set(aSelLab.Father(), aSelLab.Father());
     if (aToUnblock)
@@ -232,6 +230,8 @@ void Model_AttributeSelection::setValueCenter(
         anUpdated = !aSelLab.IsAttribute(kELLIPSE_CENTER2);
       TDataStd_UAttribute::Set(aSelLab, kELLIPSE_CENTER2);
       break;
+    default: // [to avoid compilation warning]
+      break;
     }
     if (anUpdated)
       owner()->data()->sendAttributeUpdated(this);
@@ -1690,7 +1690,6 @@ void Model_AttributeSelection::updateInHistory(bool& theRemove)
   if (!aPairIter.More())
     return;
   TopoDS_Shape aNewCShape = aPairIter.NewShape();
-  bool anIterate = true;
   // trying to update also the sub-shape selected
   GeomShapePtr aSubShape = value();
   if (aSubShape.get() && aSubShape->isEqual(aContext->shape()))
index 6acbcc4a963bd1b9962ef425a9d56a2db220be13..e28cbe647a8bf1ce269673c56639be4a3f223ca7 100644 (file)
@@ -79,6 +79,7 @@ static int getGenerationTag(const TopoDS_Shape& theShape) {
     case TopAbs_VERTEX: return GENERATED_VERTICES_TAG;
     case TopAbs_EDGE:   return GENERATED_EDGES_TAG;
     case TopAbs_FACE:   return GENERATED_FACES_TAG;
+    default: break; // [to avoid compilation warning]
   }
 
   return INVALID_TAG;
@@ -90,6 +91,7 @@ static int getModificationTag(const TopoDS_Shape& theShape) {
     case TopAbs_VERTEX: return MODIFIED_VERTICES_TAG;
     case TopAbs_EDGE:   return MODIFIED_EDGES_TAG;
     case TopAbs_FACE:   return MODIFIED_FACES_TAG;
+    default: break; // [to avoid compilation warning]
   }
 
   return INVALID_TAG;
@@ -218,7 +220,6 @@ void Model_BodyBuilder::storeGenerated(const GeomShapePtr& theFromShape,
 {
   std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
-    TDF_Label aShapeLab = aData->shapeLab();
     // clean builders
     if (theIsCleanStored)
       clean();
index ef56b55d561e14f852f8edb0b5e23625975ac130..8469e5e75795520e0bf78a553db2974d72ddf739 100644 (file)
@@ -104,8 +104,11 @@ static const int TAG_EXTERNAL_CONSTRUCTIONS = 5;
 static const Standard_GUID kEXTERNAL_SHAPE_REF("9aa5dd14-6d34-4a8d-8786-05842fd7bbbd");
 
 Model_Document::Model_Document(const int theID, const std::string theKind)
-    : myID(theID), myKind(theKind), myIsActive(false), myIsSetCurrentFeature(false),
-      myDoc(new TDocStd_Document("BinOcaf"))  // binary OCAF format
+    : myID(theID),
+      myKind(theKind),
+      myDoc(new TDocStd_Document("BinOcaf")),  // binary OCAF format
+      myIsActive(false),
+      myIsSetCurrentFeature(false)
 {
 #ifdef TINSPECTOR
   CDF_Session::CurrentSession()->Directory()->Add(myDoc);
@@ -386,7 +389,6 @@ bool Model_Document::importPart(const char* theFileName,
     TDF_LabelList anAllNewFeatures;
     // Perform the copying twice for correct references:
     // 1. copy labels hierarchy and fill the relocation table
-    TDF_Label aMain = myDoc->Main();
     for (TDF_ChildIterator anIt(aTempDoc->Main()); anIt.More(); anIt.Next()) {
       TDF_Label aCurrentLab = anIt.Value();
       Handle(TDataStd_Comment) aFeatureID;
@@ -990,7 +992,7 @@ bool Model_Document::isOperation() const
 bool Model_Document::isModified()
 {
   // is modified if at least one operation was committed and not undone
-  return myTransactions.size() != myTransactionSave || isOperation();
+  return (int)myTransactions.size() != myTransactionSave || isOperation();
 }
 
 bool Model_Document::canUndo()
@@ -1928,7 +1930,7 @@ ResultPtr Model_Document::findByName(
   }
   if (aNumInHistory) {
     std::map<std::string, std::list<TDF_Label> >::iterator aFind = myNamingNames.find(aName);
-    if (aFind != myNamingNames.end() && aFind->second.size() > aNumInHistory) {
+    if (aFind != myNamingNames.end() && (int)aFind->second.size() > aNumInHistory) {
       std::list<TDF_Label>::reverse_iterator aLibIt = aFind->second.rbegin();
       for(; aNumInHistory != 0; aNumInHistory--)
         aLibIt++;
index c3f62ce6760d06de6f452f2faa10a46155b2a7c0..e1a2d99c245329b1ab01224f066ed86796f12f5f 100644 (file)
 #include <TDF_LabelMap.hxx>
 #include <TDF_ListIteratorOfLabelList.hxx>
 
+// for TDF_Label map usage
+static Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper);
+static Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2);
+
 int kUNDEFINED_FEATURE_INDEX = -1;
 
 static const std::string& groupNameFoldering(const std::string& theGroupID,
@@ -619,9 +623,6 @@ ObjectPtr Model_Objects::object(const std::string& theGroupID,
     return ObjectPtr();
   createHistory(theGroupID);
   const std::string& aGroupID = groupNameFoldering(theGroupID, theAllowFolder);
-  const std::vector<ObjectPtr>& aVec = myHistory[theGroupID];
-  //if (aVec.size() <= theIndex)
-  //  return aVec[aVec.size() - 1]; // too high index requested (to avoid crash in #2360)
   return aGroupID.empty() ? myHistory[theGroupID][theIndex] : myHistory[aGroupID][theIndex];
 }
 
@@ -809,11 +810,11 @@ void Model_Objects::synchronizeFeatures(
     return;
   // after all updates, sends a message that groups of features were created or updated
   Events_Loop* aLoop = Events_Loop::loop();
-  static Events_ID aDispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
-  static Events_ID aCreateEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
-  static Events_ID anUpdateEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
+  //static Events_ID aDispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
+  static Events_ID aCreateEvent = aLoop->eventByName(EVENT_OBJECT_CREATED);
+  static Events_ID anUpdateEvent = aLoop->eventByName(EVENT_OBJECT_UPDATED);
   static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
-  static Events_ID aDeleteEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
+  static Events_ID aDeleteEvent = aLoop->eventByName(EVENT_OBJECT_DELETED);
   static Events_ID aToHideEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
   bool isActive = aLoop->activateFlushes(false);
 
@@ -1826,7 +1827,7 @@ std::string Model_Objects::featureResultGroup(FeaturePtr theFeature)
     if (aLabIter.More()) {
       TDF_Label anArgLab = aLabIter.Value();
       Handle(TDataStd_Comment) aGroup;
-      if (aLabIter.Value().FindAttribute(TDataStd_Comment::GetID(), aGroup)) {
+      if (anArgLab.FindAttribute(TDataStd_Comment::GetID(), aGroup)) {
         return TCollection_AsciiString(aGroup->Get()).ToCString();
       }
     }
@@ -1885,7 +1886,7 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set<FeaturePtr>& t
         if (aGroup->Get() == ModelAPI_ResultBody::group().c_str()) {
           aNewBody = createBody(theFeature->data(), aResIndex);
         } else if (aGroup->Get() == ModelAPI_ResultPart::group().c_str()) {
-          if (aResIndex <= theFeature->results().size()) { // to avoid crash if previous execute
+          if (aResIndex <= (int)theFeature->results().size()) { // to avoid crash if previous execute
             // for index = 0 erases result
             std::shared_ptr<ModelAPI_ResultPart> aNewP = createPart(theFeature->data(), aResIndex);
             if (!aNewP->data()->isDeleted()) {
@@ -2103,7 +2104,6 @@ std::shared_ptr<ModelAPI_Feature> Model_Objects::internalFeature(const int theIn
 Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper)
 {
   return TDF_LabelMapHasher::HashCode(theLab, theUpper);
-
 }
 Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2)
 {
index e44023208fb1ee7df2c9075a6e815ad10e1cda06..1be771ea13ef5a31d55dbecadd8ddb3b201dadc8 100644 (file)
 #include <set>
 #include <vector>
 
-// for TDF_Label map usage
-static Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper);
-static Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2);
-
 extern int kUNDEFINED_FEATURE_INDEX;
 
 /**\class Model_Objects
@@ -192,7 +188,7 @@ class Model_Objects
   DocumentPtr owner() {return myDoc;}
 
   //! Deletes all managed features with emitting of corresponded signal
-  ~Model_Objects();
+  virtual ~Model_Objects();
 
  protected:
 
index 87f3ec6b859d8b156509aa3d960bf673489d60e2..ee7f404a77be627c11f841cfe2ca9d4a59d3b268 100644 (file)
@@ -440,7 +440,6 @@ void storeFacesOnLabel(std::shared_ptr<Model_Document>& theDocument,
   aBuilder.Generated(theShape);
   theDocument->addNamingName(theShapeLabel, theName);
   // set new faces to the labels
-  int aCurrentTag = 1;
   NCollection_List<TopoDS_Face>::Iterator anUnordered(theUnorderedFaces);
   for (int aCurrentTag = 1; !theFacesOrder.IsEmpty() || anUnordered.More(); aCurrentTag++) {
     TopoDS_Face aFaceToPut;
index 5efa5dd390b253ff0834e439ac03fe90ec69831c..0f406a93465e8855391be51564886414cebdd65a 100644 (file)
@@ -104,14 +104,14 @@ void Model_ResultField::updateSteps()
 {
   // Update Array of steps
   int aNbSteps = stepsSize();
-  if (mySteps.size() != aNbSteps) {
-    while(mySteps.size() > aNbSteps) {
+  if ((int)mySteps.size() != aNbSteps) {
+    while((int)mySteps.size() > aNbSteps) {
       //delete mySteps.back();
       mySteps.pop_back();
     }
-    while(mySteps.size() < aNbSteps) {
+    while((int)mySteps.size() < aNbSteps) {
       mySteps.push_back(FieldStepPtr(new Model_ResultField::Model_FieldStep(this,
-        int(mySteps.size()))));
+        (int)mySteps.size())));
     }
   }
 }
@@ -146,7 +146,7 @@ std::string Model_ResultField::textLine(int theLine) const
 // LCOV_EXCL_START
 std::shared_ptr<ModelAPI_ResultField::ModelAPI_FieldStep> Model_ResultField::step(int theId) const
 {
-  if (theId < mySteps.size()) {
+  if (theId < (int)mySteps.size()) {
     return mySteps[theId];
   }
   return NULL;
index cd3997aca18d7403b857ba48031da2cead5b28de..044893237ec599e8bef4d356bc5b6b0f19da9d8c 100644 (file)
@@ -290,7 +290,7 @@ std::string Model_ResultPart::nameInPart(const std::shared_ptr<GeomAPI_Shape>& t
   std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(partDoc());
   if (!aDoc.get()) // the part document is not presented for the moment
     return "";
-  TDF_Label anAccessLabel = aDoc->generalLabel();
+  MAYBE_UNUSED TDF_Label anAccessLabel = aDoc->generalLabel();
   // make the selection attribute anyway:
   // otherwise just by name it is not stable to search the result
   std::string aName;
index d006d437417db45d9e2dfdb85bc24050ab7e33c4..9e8de8d22f270a7c2c7fb2c3bf6102a4592df638 100644 (file)
@@ -227,7 +227,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
 void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   static Events_Loop* aLoop = Events_Loop::loop();
-  static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
+  //static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
   static const Events_ID kCreatedEvent = aLoop->eventByName(EVENT_OBJECT_CREATED);
   static const Events_ID kUpdatedEvent = aLoop->eventByName(EVENT_OBJECT_UPDATED);
   static const Events_ID kOpFinishEvent = aLoop->eventByName("FinishOperation");
@@ -265,7 +265,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
         }
       }
       processFeatures();
-      myIsPreviewBlocked = myIsPreviewBlocked;
+      myIsPreviewBlocked = aPreviewBlockedState;
     }
   }
 
index 5b2992312bb07aacbff12f42aacdd0724f2d80f2..0547252dc1805f84529f2d1f6b2e12e6759c593f 100644 (file)
@@ -37,78 +37,85 @@ class ModelAPI_Document;
 class ModelAPI_ResultParameter;
 class GeomAPI_Pnt2d;
 
+#if defined __GNUC__ || defined __clang__
+#define MAYBE_UNUSED __attribute__((unused))
+#else
+#define MAYBE_UNUSED
+#endif
+
 /// Event ID that feature is created (comes with ModelAPI_ObjectUpdatedMessage)
-static const char * EVENT_OBJECT_CREATED = "ObjectCreated";
+MAYBE_UNUSED static const char * EVENT_OBJECT_CREATED = "ObjectCreated";
 /// Event ID that data of feature is updated (comes with Model_ObjectUpdatedMessage)
-static const char * EVENT_OBJECT_UPDATED = "ObjectUpdated";
+MAYBE_UNUSED static const char * EVENT_OBJECT_UPDATED = "ObjectUpdated";
 /// Event ID that data of feature is deleted (comes with Model_ObjectDeletedMessage)
-static const char * EVENT_OBJECT_DELETED = "ObjectDeleted";
+MAYBE_UNUSED static const char * EVENT_OBJECT_DELETED = "ObjectDeleted";
 /// Event ID that name of feature is changed (comes with Model_ObjectRenamedMessage)
-static const char * EVENT_OBJECT_RENAMED = "ObjectRenamed";
+MAYBE_UNUSED static const char * EVENT_OBJECT_RENAMED = "ObjectRenamed";
 /// Event ID that data of feature is updated (comes with ModelAPI_ObjectUpdatedMessage)
-static const char * EVENT_OBJECT_MOVED = "ObjectsMoved";
+MAYBE_UNUSED static const char * EVENT_OBJECT_MOVED = "ObjectsMoved";
 /// Event ID that visualization must be redisplayed (comes with ModelAPI_ObjectUpdatedMessage)
-static const char * EVENT_OBJECT_TO_REDISPLAY = "ObjectsToRedisplay";
+MAYBE_UNUSED static const char * EVENT_OBJECT_TO_REDISPLAY = "ObjectsToRedisplay";
 /// Event ID that plugin is loaded (comes with ModelAPI_ObjectUpdatedMessage)
-static const char * EVENT_PLUGIN_LOADED = "PluginLoaded";
+MAYBE_UNUSED static const char * EVENT_PLUGIN_LOADED = "PluginLoaded";
 /// The active document becomes another one
-static const char * EVENT_DOCUMENT_CHANGED = "CurrentDocumentChanged";
+MAYBE_UNUSED static const char * EVENT_DOCUMENT_CHANGED = "CurrentDocumentChanged";
 
 /// Event ID that order of objects in group is changed,
 /// so, tree must be fully recreated (movement of feature)
-static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
+MAYBE_UNUSED static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
 /// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
-static const char * EVENT_UPDATE_SELECTION = "UpdateSelection";
+MAYBE_UNUSED static const char * EVENT_UPDATE_SELECTION = "UpdateSelection";
 
 /// Request for the enabled/disabled actions behavior for some specific features
-static const char * EVENT_FEATURE_STATE_REQUEST = "FeatureStateRequest";
+MAYBE_UNUSED static const char * EVENT_FEATURE_STATE_REQUEST = "FeatureStateRequest";
 /// Reply for the enabled/disabled actions behavior for some specific features
-static const char * EVENT_FEATURE_STATE_RESPONSE = "FeatureStateResponse";
+MAYBE_UNUSED static const char * EVENT_FEATURE_STATE_RESPONSE = "FeatureStateResponse";
 
 /// To block the viewer updates
-static const char * EVENT_UPDATE_VIEWER_BLOCKED = "UpdateViewerBlocked";
+MAYBE_UNUSED static const char * EVENT_UPDATE_VIEWER_BLOCKED = "UpdateViewerBlocked";
 /// To unblock the viewer updates
-static const char * EVENT_UPDATE_VIEWER_UNBLOCKED = "UpdateViewerUnblocked";
+MAYBE_UNUSED static const char * EVENT_UPDATE_VIEWER_UNBLOCKED = "UpdateViewerUnblocked";
 
 /// To inform that there is an empty presentation in the viewer
-static const char * EVENT_EMPTY_AIS_PRESENTATION = "EmptyAISPresentation";
+MAYBE_UNUSED static const char * EVENT_EMPTY_AIS_PRESENTATION = "EmptyAISPresentation";
 /// To inform that there is an empty operation for presentation in the viewer
-static const char * EVENT_EMPTY_OPERATION_PRESENTATION = "EmptyOperationPresentation";
+MAYBE_UNUSED static const char * EVENT_EMPTY_OPERATION_PRESENTATION = "EmptyOperationPresentation";
 /// To block preview
-static const char * EVENT_PREVIEW_BLOCKED = "PreviewBlocked";
+MAYBE_UNUSED static const char * EVENT_PREVIEW_BLOCKED = "PreviewBlocked";
 /// To preview the current feature in the viewer (to compute the result)
-static const char * EVENT_PREVIEW_REQUESTED = "PreviewRequested";
+MAYBE_UNUSED static const char * EVENT_PREVIEW_REQUESTED = "PreviewRequested";
 /// To block automatic recomputation of any feature (by the GUI button press)
-static const char * EVENT_AUTOMATIC_RECOMPUTATION_DISABLE = "DisableAutomaticRecomputation";
+MAYBE_UNUSED static const char * EVENT_AUTOMATIC_RECOMPUTATION_DISABLE = "DisableAutomaticRecomputation";
 /// To unblock block automatic recomputation (default state: the GUI button unpressed)
-static const char * EVENT_AUTOMATIC_RECOMPUTATION_ENABLE = "EnableAutomaticRecomputation";
+MAYBE_UNUSED static const char * EVENT_AUTOMATIC_RECOMPUTATION_ENABLE = "EnableAutomaticRecomputation";
 
 /// Event ID that solver has conflicting constraints (comes with ModelAPI_SolverFailedMessage)
-static const char * EVENT_SOLVER_FAILED = "SolverFailed";
+MAYBE_UNUSED static const char * EVENT_SOLVER_FAILED = "SolverFailed";
 /// Event ID that the problem in solver disappeared
-static const char * EVENT_SOLVER_REPAIRED = "SolverRepaired";
+MAYBE_UNUSED static const char * EVENT_SOLVER_REPAIRED = "SolverRepaired";
 
 /// Event Id that sketch has DoF = 0
-static const char * EVENT_SKETCH_FULLY_CONSTRAINED = "SketchFullyConstrainted";
+MAYBE_UNUSED static const char * EVENT_SKETCH_FULLY_CONSTRAINED = "SketchFullyConstrainted";
 /// Event Id that sketch has DoF > 0
-static const char * EVENT_SKETCH_UNDER_CONSTRAINED = "SketchUnderConstrainted";
+MAYBE_UNUSED static const char * EVENT_SKETCH_UNDER_CONSTRAINED = "SketchUnderConstrainted";
 /// Event Id that sketch has DoF < 0
-static const char * EVENT_SKETCH_OVER_CONSTRAINED  = "SketchOverConstrainted";
+MAYBE_UNUSED static const char * EVENT_SKETCH_OVER_CONSTRAINED  = "SketchOverConstrainted";
 
 /// Event ID that informs that some object has changed the stability
-static const char * EVENT_STABILITY_CHANGED = "StabilityChanged";
+MAYBE_UNUSED static const char * EVENT_STABILITY_CHANGED = "StabilityChanged";
 
 /// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
-static const char * EVENT_SKETCH_PREPARED = "SketchPrepared";
+MAYBE_UNUSED static const char * EVENT_SKETCH_PREPARED = "SketchPrepared";
 
 /// Event ID that provides a request for list of non-fixed objects necessary for DoF = 0
-static const char * EVENT_GET_DOF_OBJECTS = "GetDoFObjects";
+MAYBE_UNUSED static const char * EVENT_GET_DOF_OBJECTS = "GetDoFObjects";
 
 /// Event ID that provides a request for list of non-fixed objects necessary for DoF = 0
-static const char * EVENT_DOF_OBJECTS = "DoFObjects";
+MAYBE_UNUSED static const char * EVENT_DOF_OBJECTS = "DoFObjects";
 
 /// Event ID that requests updates visual attributes for presentations
-static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttributes";
+MAYBE_UNUSED static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttributes";
+
 
 /// Message that feature was changed (used for Object Browser update): moved, updated and deleted
 class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
@@ -175,6 +182,8 @@ public:
 class MODELAPI_EXPORT ModelAPI_EventCreator
 {
 public:
+  virtual ~ModelAPI_EventCreator() {}
+
   /// creates created, updated or moved messages and sends to the loop
   virtual void sendUpdated(const ObjectPtr& theObject, const Events_ID& theEvent,
                            const bool isGroupped = true) const = 0;
index 7b354f89147291da3fbaacb2e7bfb8c34c5e8b80..bf478d4e77bcfb5e1c55e4417b7d6efca6fd27a2 100644 (file)
@@ -254,6 +254,8 @@ typedef std::shared_ptr<ModelAPI_Feature> FeaturePtr;
 //! over this feature.
 class ModelAPI_FeatureCopyInterface {
 public:
+  virtual ~ModelAPI_FeatureCopyInterface() {}
+
   /// An algorithm to update the moved feature by the separate Copy feature
   /// \param theContext the original context object
   /// \param theValue the original shape
index e458e9df558d4aaccb50b924e0677facd3f3d126..d8735a5c69536885ccb4c4ed2007c30251580b63 100644 (file)
@@ -34,6 +34,8 @@
 class ModelAPI_FiltersFactory
 {
 public:
+  virtual ~ModelAPI_FiltersFactory() {}
+
   /// Register an instance of a filter
   /// \param theID unique identifier of the filter, not necessary equal to the name of filter
   /// \param theFilter the filter's instance
index 442ad4a18adc988e13891e57f217da93768e9eea..b7f378b9899a6d9ae84a1194953b5b9c91ae8c8b 100644 (file)
@@ -65,6 +65,8 @@ typedef std::shared_ptr<ModelAPI_Validator> ValidatorPtr;
 class MODELAPI_EXPORT ModelAPI_ValidatorsFactory
 {
  public:
+   virtual ~ModelAPI_ValidatorsFactory() {}
+
   /// Registers the instance of the validator by the ID
   virtual void registerValidator(const std::string& theID, ModelAPI_Validator* theValidator) = 0;
 
index 45b1d3a3325f6e414394489feb6e288dc10bf1a8..19328db10fcc361a6e0526a72ac33d2d95188925 100644 (file)
@@ -386,7 +386,7 @@ std::string doubleToString(double theValue)
 {
   std::string aValueStr;
   char aBuf[50];
-  int n = sprintf(aBuf, "%g", theValue);
+  sprintf(aBuf, "%g", theValue);
   aValueStr = std::string(aBuf);
   return aValueStr;
 }
index 03047bfa97c8a6e4d9659953b7cf6427f9be2d31..c25f2cbc64d0479f5b0a6d363197af859e69c4ff 100644 (file)
@@ -674,7 +674,6 @@ void ModelHighAPI_Dumper::saveResultNames(const FeaturePtr& theFeature)
   bool isFeatureDefaultName = myNames[theFeature].myIsDefault;
 
   // Save only names of results which is not correspond to default feature name
-  const std::list<ResultPtr>& aResults = theFeature->results();
   std::list<ResultPtr> allRes;
   ModelAPI_Tools::allResults(theFeature, allRes);
   for(std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
@@ -1618,7 +1617,7 @@ void ModelHighAPI_Dumper::exportVariables() const
         exportVariable(anEntry, aNameIter->second.myCurrentName);
         size_t aSize = aFeature->results().size();
         if (aSize > 1) { // additional entries for features with more than one result
-          for(int a = 1; a < aSize; a++) {
+          for(size_t a = 1; a < aSize; a++) {
             std::ostringstream aResEntryStr;
             aResEntryStr<<anEntry<<":"<<a;
             std::string aResEntry = aResEntryStr.str();
index 53cd0570f1ca69a5183e76b369cffd33b612f982..984ca70e28dd147c430112381da8361df71dbb1b 100644 (file)
@@ -91,6 +91,8 @@ public:
     MODELHIGHAPI_EXPORT DumpStorage(const DumpStorage& theOther);
     MODELHIGHAPI_EXPORT const DumpStorage& operator=(const DumpStorage& theOther);
 
+    virtual ~DumpStorage() {}
+
     void setFilenameSuffix(const std::string& theSuffix) { myFilenameSuffix = theSuffix; }
 
   protected:
index 679a8d259d2ac4ead675a49911dd9b1ac502aed2..7cc4cf0e402e7645b6253f499827d60c28126632 100644 (file)
@@ -102,6 +102,8 @@ void ModelHighAPI_Selection::fillAttribute(
       theAttribute->selectSubShape(
         myWeakNamingPair.first, myWeakNamingPair.second.first, myWeakNamingPair.second.second);
       break;
+    case VT_Filtering:
+      break; // do nothing [to avoid compilation warning]
   }
 
   if (theAttribute->isInvalid()) {
@@ -178,6 +180,8 @@ std::string ModelHighAPI_Selection::shapeType() const
                                                myResultSubShapePair.first->shape()->shapeTypeStr();
   case VT_TypeSubShapeNamePair: return myTypeSubShapeNamePair.first;
   case VT_TypeInnerPointPair: return myTypeInnerPointPair.first;
+  default:
+    break; // do nothing [to avoid compilation warning]
   }
 
   return "SHAPE";
index 52f07aa791ed72b36b18a67241b1e2e2ade5212a..3f82be3116c48e983e4c9fd7f2672f6f979bd981 100644 (file)
@@ -375,6 +375,8 @@ GeomAPI_Shape::ShapeType getShapeType(const ModelHighAPI_Selection& theSelection
       aShapeType = shapeTypeByStr(aType);
       break;
     }
+    default:
+      break; // do nothing [to avoid compilation warning]
   }
 
   return aShapeType;
@@ -419,7 +421,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
      }
   }
   // store the model features information: iterate all features
-  int anObjectsCount = 0; // stores the number of compared features for this document to compare
+  size_t anObjectsCount = 0; // stores the number of compared features for this document to compare
   std::set<std::string> aProcessed; // processed features names (that are in the current document)
 
   // process all objects (features and folders)
index a3ba9012a1afad3bd0b127ed05c442d55de630fb..ece81f88fd97b8e9ceec59275c2e0f87ff38c25c 100644 (file)
@@ -61,7 +61,6 @@ ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget
 
   ModuleBase_ModelWidget* aWgt;
   QList<ModuleBase_ModelWidget*>::const_iterator aWIt;
-  bool isOffToolBox = false;
   for (aWIt = theWidgets.begin(); aWIt != theWidgets.end() && !aFirstWidget; ++aWIt) {
     aWgt = (*aWIt);
     if (!aValidators->isCase(aWgt->feature(), aWgt->attributeID()))
index 29002e2e5fca4bcf4800db0b1ffa30086a176650..87a1b3565c677b01d38c1932555c0b0b1f8ee0ee 100644 (file)
@@ -42,9 +42,11 @@ class SelectMgr_EntityOwner;
 /// A selection can be obtained as from a viewer as from Object browser in various forms
 class MODULEBASE_EXPORT ModuleBase_ISelection
 {
- public:
-   /// Types of the selection place, where the selection is obtained
-   enum SelectionPlace { Browser, Viewer, AllControls };
+public:
+  /// Types of the selection place, where the selection is obtained
+  enum SelectionPlace { Browser, Viewer, AllControls };
+
+  virtual ~ModuleBase_ISelection() {}
 
   /// Returns a list of viewer selected presentations
   /// \return list of presentations
index b63819420a31729b467c6f66f7f20bd09cf428ab..c1ec22c13b431550493c6947397dfa757d3ccea5 100644 (file)
@@ -39,7 +39,7 @@ public:
   ModuleBase_ISelectionActivate(ModuleBase_IWorkshop* theWorkshop) : myWorkshop(theWorkshop) {}
 
   /// Destructor
-  ~ModuleBase_ISelectionActivate() {}
+  virtual ~ModuleBase_ISelectionActivate() {}
 
   /// Updates active selection modes in the viewer depending on the application state
   MODULEBASE_EXPORT virtual void updateSelectionModes() = 0;
index 216dce14cc9842d907daa2e0cbc52e631d94e9e2..ce3705b09b682659110155006318f4272f1bd506 100644 (file)
@@ -34,6 +34,8 @@
 class MODULEBASE_EXPORT ModuleBase_IconFactory
 {
 public:
+  virtual ~ModuleBase_IconFactory() {}
+
   /// Returns icons factory instance
   static ModuleBase_IconFactory* get();
 
index ebab17d18722eb897722cfc2fc4141e4f7d8ce1c..1b67bf687089fed5f1e094180e63e95280d12980 100644 (file)
@@ -28,7 +28,7 @@
 ModuleBase_LabelValue::ModuleBase_LabelValue(QWidget* theParent, const QString& theText,
                                              const QString& theToolTip, const QString& theIcon,
                                              int thePrecision)
-: QWidget(theParent), myPrecision(thePrecision), myValue(0)
+: QWidget(theParent), myValue(0), myPrecision(thePrecision)
 {
   QHBoxLayout* aLayout = new QHBoxLayout(this);
   aLayout->setContentsMargins(2, 0, 0, 0);
index f0c41371291e04b4a420f5011968142af6ed8ad4..b3bc3a10023057c429026ab5aa3e9f286a403564 100644 (file)
 ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent,
   const Config_WidgetAPI* theData)
   : QWidget(theParent),
+  myWidgetValidator(0),
   myIsEditing(false),
   myState(Stored),
   myIsValueStateBlocked(false),
-  myFlushUpdateBlocked(false),
-  myWidgetValidator(0)
+  myFlushUpdateBlocked(false)
 {
 #ifdef DEBUG_WIDGET_INSTANCE
   qDebug("ModuleBase_ModelWidget::ModuleBase_ModelWidget");
index 15376639a07f6bb6ed3783a12694a2a4c77a73b5..8b3b4c410a189909c3bc8d012f0943f7b27c9e29 100644 (file)
@@ -393,20 +393,16 @@ ModuleBase_ModelWidget* ModuleBase_OperationFeature::activateByPreselection(
         }
       }
       else {
-        bool isSet = false;
         // 1. apply the selection to controls
         for (aWIt = aWidgets.constBegin(); aWIt != aWidgets.constEnd(); ++aWIt) {
           aWgt = (*aWIt);
           if (!aWgt->canAcceptFocus())
             continue;
           aPropertyPanel->setPreselectionWidget(aWgt);
-          if (myPreSelection.empty() || !aWgt->setSelection(myPreSelection, true)) {
-            isSet = false;
+          if (myPreSelection.empty() || !aWgt->setSelection(myPreSelection, true))
             break;
-          } else {
-            isSet = true;
+          else
             aFilledWgt = aWgt;
-          }
         }
       }
       aPropertyPanel->setPreselectionWidget(NULL);
index 957bdfa65af0293bbf6651eff90f257ea840114b..284e4bf7a84a01eeda0c7c8c3973bdfc571873f3 100644 (file)
@@ -34,7 +34,7 @@ static QMap<std::string, std::string> defaultValues;
 ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent,
                                                      const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData),
-  myIsFocusOnCurrentPage(false), myIsFirst(true), myRemeberChoice(true)
+  myRemeberChoice(true), myIsFocusOnCurrentPage(false), myIsFirst(true)
 {
   // it is not obligatory to be ignored when property panel tries to activate next active widget
   // but if focus is moved to this control, it can accept it.
index fcfbf29492ff032e510c5d6dc6c697abfe802db6..5d48ad9a81edab5bab1f47f165fdf44cb4f56bb2 100644 (file)
@@ -47,9 +47,9 @@ ModuleBase_ParamSpinBox::ModuleBase_ParamSpinBox(QWidget* theParent, int thePrec
   : QAbstractSpinBox(theParent),
   myIsEquation(false),
   myAcceptVariables(true),
-  mySingleStep(1),
   myMinimum(-DBL_MAX),
-  myMaximum(DBL_MAX)
+  myMaximum(DBL_MAX),
+  mySingleStep(1)
 {
   myCompleter = new QCompleter(this);
   myCompleter->setWidget(lineEdit());
index ee5f55447eb5812e554c54f01b8232794323110c..e07a3119b7f76bddac3062752f67b185d9d1c425 100644 (file)
@@ -153,7 +153,6 @@ void ModuleBase_Preferences::resetConfigPropPreferences(SUIT_PreferenceMgr* theP
 void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int thePageId)
 {
   SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
-  bool isResModified = false;
 
   // Make a Tab from each section
   std::list<std::string> aSections = Config_PropManager::getSections();
@@ -169,10 +168,9 @@ void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int
       // check that the property is defined
       QString aSection(aProp->section().c_str());
       QString aName(aProp->name().c_str());
-      if (!aResMgr->hasValue(aSection, aName)) {
+      if (!aResMgr->hasValue(aSection, aName))
         aResMgr->setValue(aSection, aName, QString(aProp->value().c_str()));
-        isResModified = true;
-      }
+
       // Add item
       if (aProp->type() != Config_Prop::Disabled) {
         SUIT_PreferenceMgr::PrefItemType aPrefType = SUIT_PreferenceMgr::Auto;
@@ -228,6 +226,8 @@ void ModuleBase_Preferences::createCustomPage(ModuleBase_IPrefMgr* thePref, int
             thePref->setItemProperty("icons", aIconsList, anId);
           }
           break;
+        default: // [to avoid compilation warnings]
+          break;
         }
       }
     }
index 7d15974a3dcfdc17bd2827b8c26dd9a364952eff..2caa00fb7967598a7f01cf6de1fe51ffd594a92b 100644 (file)
@@ -69,8 +69,11 @@ IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ResultPrs, ViewerData_AISShape);
 
 //********************************************************************
 ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
-  : ViewerData_AISShape(TopoDS_Shape()), myResult(theResult), myAdditionalSelectionPriority(0),
-  myTransparency(1), myIsSubstituted(false)
+  : ViewerData_AISShape(TopoDS_Shape()),
+    myResult(theResult),
+    myIsSubstituted(false),
+    myTransparency(1),
+    myAdditionalSelectionPriority(0)
 {
 
   GeomShapePtr aShapePtr = ModelAPI_Tools::shape(theResult);
@@ -199,8 +202,6 @@ void ModuleBase_ResultPrs::setEdgesDefaultColor()
 //********************************************************************
 void ModuleBase_ResultPrs::setSubShapeHidden(const TopoDS_ListOfShape& theShapes)
 {
-  bool isModified = false;
-
   TopoDS_Compound aCompound;
   BRep_Builder aBBuilder;
   aBBuilder.MakeCompound (aCompound);
index e884203dd36cddaad2d9b68866a55beed94bfdef..2efbf3d3f247959701c9a3433bc99b83abfd2950 100644 (file)
@@ -121,7 +121,6 @@ bool ModuleBase_ToolBox::isOffToolBoxParent(ModuleBase_ModelWidget* theWidget)
     while (aParent) {
       QStackedWidget* aStackedWidget = dynamic_cast<QStackedWidget*>(aParent);
       if (aStackedWidget) {
-        int anIndex = aStackedWidget->currentIndex();
         isOffToolBox = aStackedWidget->currentWidget() != aWidget;
         break;
       }
index 17e6c516e73120e37adf2b7aa062214f407b3c66..40b17fe760bcc0c52359de858e64f4250322ee8b 100644 (file)
@@ -1011,8 +1011,6 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
   aPartFeatureNames.sort();
   anOtherFeatureNames.sort();
 
-  bool aCanReplaceParameters = !aFeaturesRefsToParameterOnly.empty();
-
   QMessageBox aMessageBox(theParent);
   aMessageBox.setWindowTitle(QObject::tr("Delete features"));
   aMessageBox.setIcon(QMessageBox::Warning);
@@ -1041,7 +1039,9 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
                        "be deleted.\nOr parameters could be replaced by their values.\n";
     aText += QString(QObject::tr(aMsg))
                      .arg(aParamFeatureNames.join(aSep));
+#ifdef _DEBUG
     QPushButton *aReplaceButton =
+#endif
       aMessageBox.addButton(QObject::tr("Replace"), QMessageBox::ActionRole);
   }
 
@@ -1287,8 +1287,6 @@ std::string generateName(const AttributePtr& theAttribute,
 {
   std::string aName;
   if (theAttribute.get() != NULL) {
-    ModuleBase_Operation* anOperation = theWorkshop->currentOperation();
-
     FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
     if (aFeature.get()) {
       std::string aXmlCfg, aDescription;
index d24dbfd693643e7c6eee8daf07a25b30b59748ed..f3d5da98616e593b5b216c6bc4d4b3a5cd78e769 100644 (file)
@@ -158,6 +158,8 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(
                 case Prs3d_DP_ZAxis:
                   aDir = anAxis.Direction();
                   break;
+                default: // [to avoid compilation warning]
+                  break;
                 }
                 gp_Lin aLine(aTrihedron->Component()->Location(), aDir);
                 return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular());
index c492b4da768a4d32a68f3612e6025012805c1233..06463235a69660b24b6d1e0d94ac2e0988df49de 100644 (file)
@@ -26,8 +26,8 @@ ModuleBase_ViewerPrs::ModuleBase_ViewerPrs(ObjectPtr theResult,
                                            const GeomShapePtr& theShape,
                                            Handle(SelectMgr_EntityOwner) theOwner)
 : myResult(theResult),
-  myShape(theShape),
-  myOwner(theOwner)
+  myOwner(theOwner),
+  myShape(theShape)
 {
 }
 
index 06d6685a3d897acc63294b1384cb8cf2352cd17d..425e60ae6a11f29078708577d6dc05be78cb2f01 100644 (file)
@@ -73,14 +73,12 @@ bool ModuleBase_WidgetConcealedObjects::storeValueCustom()
   DataPtr aData = myFeature->data();
   AttributeRefListPtr anAttributeList = aData->reflist(attributeID());
   anAttributeList->clear();
-  int aSize1 = anAttributeList->size(false);
   for (int i = 0, aSize = myView->rowCount(); i < aSize; i++) {
     QCheckBox* aButton =
         dynamic_cast<QCheckBox*>(myView->cellWidget(i, 0)->findChild<QCheckBox*>());
     if (aButton->isChecked())
       anAttributeList->append(myConcealedResults[i]);
   }
-  int aSize = anAttributeList->size(false);
   return true;
 }
 
@@ -127,7 +125,6 @@ bool ModuleBase_WidgetConcealedObjects::restoreValueCustom()
 
   DataPtr aData = myFeature->data();
   AttributeRefListPtr anAttributeList = aData->reflist(attributeID());
-  int aSize = anAttributeList->size();
   for (int i = 0, aSize = myView->rowCount(); i < aSize; i++) {
     ResultPtr aResult = myConcealedResults[i];
     QCheckBox* aButton =
index 22a88b2c4cf1de3cc81c5e195051bb59329ced92..f76eb34e1321318e642fa2954af1c28c1192bfdd 100644 (file)
@@ -98,7 +98,6 @@ ModuleBase_WidgetFeatureSelector::~ModuleBase_WidgetFeatureSelector()
 //********************************************************************
 bool ModuleBase_WidgetFeatureSelector::setSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
 {
-  ModuleBase_ISelection* aSelection = myWorkshop->selection();
   ObjectPtr anObject = ModelAPI_Feature::feature(thePrs->object());
   GeomShapePtr aShape;
 
index bb2bd26c8272937b9b91b9d1c6d523990af0ef74..7a47835c8a1b984de1fdc6aa9939ef5db144f1f2 100644 (file)
@@ -84,7 +84,10 @@ bool ModuleBase_WidgetLabel::restoreValueCustom()
         std::wstring aWStr((wchar_t*)aStr);
         static const int aBufSize = 1000;
         static char aMBStr[aBufSize];
-        size_t aLen = wcstombs(aMBStr, aWStr.c_str(), aBufSize);
+#ifdef _DEBUG
+        size_t aLen =
+#endif
+          wcstombs(aMBStr, aWStr.c_str(), aBufSize);
         std::string aCodec = Config_Translator::codec("");
         aText = QTextCodec::codecForName(aCodec.c_str())->toUnicode(aMBStr);
       } else {
index 5c5c8a8ef8e56800723eddd7f76a06ebf3866d58..451a371ec4ce7745ff87ee5f3baaae17b79760bc 100644 (file)
@@ -1119,6 +1119,8 @@ QList<ActionInfo>
         i--;
       }
       break;
+    default: // [to avoid compilation warning]
+      break;
     }
   }
   return aList;
index 7fcc62c359d73dd2a1d55ad41ba0edb51a5242a7..656bb73099780db3458f8210fdb386f505559042 100644 (file)
@@ -44,9 +44,9 @@ ModuleBase_WidgetOptionalBox::ModuleBase_WidgetOptionalBox(QWidget* theParent,
   myGroupBox(0),
   myGroupBoxLayout(0),
   myCheckGroup(0),
-  myCheckGroupLayout(0),
-  myCheckContent(0),
   myCheckGroupBtn(0),
+  myCheckContent(0),
+  myCheckGroupLayout(0),
   myEnableOnCheck(true)
 {
   myToolTip = theData->widgetTooltip();
index d6c7e1024497cf70e6da1747544e99d857922c92..4c97737c42dbd6ae38be99375ca8e7e9bcb08d1b 100644 (file)
@@ -57,7 +57,9 @@ int ModuleBase_WidgetSwitch::addPage(ModuleBase_PageBase* thePage, const QString
                                                                    const QPixmap& theIcon,
                                                                    const QString& theTooltip)
 {
+#ifdef _DEBUG
   int aSuperCount =
+#endif
     ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
   myCombo->addItem(translate(theName.toStdString()));
   int aResultCount = myCombo->count();
index e86c5e4aa99cf445fd1b4be502dd046234d4573a..af4f04e985f7ac224306375f6f6e6be0767ee0b3 100644 (file)
@@ -328,8 +328,6 @@ bool ModuleBase_WidgetValidated::isValidAttribute(const AttributePtr& theAttribu
 //********************************************************************
 bool ModuleBase_WidgetValidated::isFilterActivated() const
 {
-  bool isActivated = false;
-
   Handle(SelectMgr_Filter) aSelFilter = myWorkshop->validatorFilter();
   ModuleBase_IViewer* aViewer = myWorkshop->viewer();
 
index 67f28aa8d74ff7f7ec34dec37acd768ed8597fbf..9f1e5a5b8241798c4c3a3ab56b336101af9ada4c 100644 (file)
@@ -28,7 +28,7 @@
 
 ModuleBase_WidgetValidator::ModuleBase_WidgetValidator(ModuleBase_ModelWidget* theModelWidget,
                                                        ModuleBase_IWorkshop* theWorkshop)
-: myModelWidget(theModelWidget), myWorkshop(theWorkshop), myIsInValidate(false)
+  : myIsInValidate(false), myModelWidget(theModelWidget), myWorkshop(theWorkshop)
 {
   myAttributeStore = new ModuleBase_WidgetSelectorStore();
 }
@@ -78,8 +78,6 @@ bool ModuleBase_WidgetValidator::isValidAttribute(const AttributePtr& theAttribu
 
 bool ModuleBase_WidgetValidator::isFilterActivated() const
 {
-  bool isActivated = false;
-
   Handle(SelectMgr_Filter) aSelFilter = myWorkshop->validatorFilter();
   ModuleBase_IViewer* aViewer = myWorkshop->viewer();
 
index d35164f51967a5ed1c829f444f7e78491def1025..32194253c7c69fac31b2ea68bd82aedb02b71826 100644 (file)
@@ -60,11 +60,6 @@ static std::string toStdString(double theValue)
   return sstream.str() + aPnt;
 }
 
-static std::set<std::string> toSet(const std::list<std::string>& theContainer)
-{
-  return std::set<std::string>(theContainer.begin(), theContainer.end());
-}
-
 //------------------------------------------------------------------------------
 
 ParametersPlugin_EvalListener::ParametersPlugin_EvalListener()
@@ -76,7 +71,7 @@ ParametersPlugin_EvalListener::ParametersPlugin_EvalListener()
       ModelAPI_ReplaceParameterMessage::eventId()
   };
 
-  for (int i = 0; i < sizeof(anEvents_IDs)/sizeof(anEvents_IDs[0]); ++i)
+  for (unsigned long long i = 0; i < sizeof(anEvents_IDs)/sizeof(anEvents_IDs[0]); ++i)
     aLoop->registerListener(this, anEvents_IDs[i], NULL, true);
 }
 
index bb118bb058e8d17e8ab332e961f1d222be26d851..49121ea3a9f37c64fc16d1c4d486fd52f36f8cbe 100644 (file)
@@ -150,7 +150,7 @@ double ParametersPlugin_Parameter::evaluate(const std::string& theExpression, st
     theError = aProcessMessage->error();
     // compare the list of parameters to store if changed
     AttributeRefListPtr aParams = reflist(ARGUMENTS_ID());
-    bool aDifferent = aParams->size() != aParamsList.size();
+    bool aDifferent = aParams->size() != (int)aParamsList.size();
     if (!aDifferent) {
       std::list<ResultParameterPtr>::const_iterator aNewIter = aParamsList.begin();
       std::list<ObjectPtr> anOldList = aParams->list();
index 11c3e7a370fe9a4085b1905d38ae68c7f8c8e81a..2e246ba83a8a5c5fe865da2b8a57b0c35c962a04 100644 (file)
@@ -140,7 +140,7 @@ bool PartSet_BSplineWidget::restoreValueCustom()
       aData->attribute(SketchPlugin_BSpline::POLES_ID()));
   AttributeDoubleArrayPtr aWeights = aData->realArray(SketchPlugin_BSpline::WEIGHTS_ID());
 
-  while (myPoles.size() < aPoles->size())
+  while ((int)myPoles.size() < aPoles->size())
     addPoleWidget();
 
   std::list<BSplinePoleWidgets>::iterator anIt = myPoles.begin();
index a491ec7eccd5871405b9332d62c671ca88a7a636..11f635666a5f1dddb44029dccfe46d29fe86e42a 100644 (file)
@@ -152,9 +152,9 @@ private:
   Quantity_Color getShapeColor(const ModuleBase_IModule::ModuleBase_CustomizeFlag& theFlag);
 
 private:
-  bool myPresentationIsEmpty; /// Boolean state about empty presentation
-  FeaturePtr myFeature; /// Reference to a feature object
   ModuleBase_IWorkshop* myWorkshop; /// current workshop
+  FeaturePtr myFeature; /// Reference to a feature object
+  bool myPresentationIsEmpty; /// Boolean state about empty presentation
   /// map of presentation type to AIS object
   QMap<ModuleBase_IModule::ModuleBase_CustomizeFlag, AISObjectPtr> myPresentations;
   /// State whether the presentation is activated/deactivated
index 4d3ed48eec3c18b4388068c6b7571c0883fdaa4a..ec091abe1a008d6fbb68d435fc98cb6f1111df79 100644 (file)
@@ -119,6 +119,8 @@ QList<double> PartSet_FieldStepPrs::range(double& theMin, double& theMax) const
       case ModelAPI_AttributeTables::INTEGER:
         aFieldStepData << aVal.myInt;
         break;
+      default: // [to avoid compilation warning]
+        break;
       }
     }
   }
@@ -256,7 +258,6 @@ QList<double> PartSet_FieldStepPrs::booleanValues() const
     }
   }
   QList<double> aShapeData;
-  double aRangeMin = aFieldStepData.first(), aRangeMax = aFieldStepData.last();
   for (int aRow = 0; aRow < aRows - 1; aRow++) {
     double aNorm = 0;
     int aBaseIndex = aRow * aCols;
index 5846b9e4887e39e8866006024c77b3d77adcaa14..d6f054093c3e973790d95e41501a563c3d410a86 100644 (file)
@@ -137,6 +137,8 @@ QIcon PartSet_IconFactory::getIcon(ObjectPtr theObj)
               return QIcon(":icons/group_face.png");
             case GeomAPI_Shape::SOLID:
               return QIcon(":icons/group_solid.png");
+            default: // [to avoid compilation warning]
+              break;
             }
           }
           ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
@@ -151,6 +153,8 @@ QIcon PartSet_IconFactory::getIcon(ObjectPtr theObj)
         case GeomAPI_Shape::WIRE:      return QIcon(":pictures/wire.png");
         case GeomAPI_Shape::EDGE:      return QIcon(":pictures/edge.png");
         case GeomAPI_Shape::VERTEX:    return QIcon(":pictures/vertex.png");
+        default: // [to avoid compilation warning]
+          break;
       }
     }
   }
index ee917531651e9ef04b8b54006d2b767d7c685cb1..d3c508a5bb934fada9b1e0c120ef7f7ab4efaab8 100644 (file)
@@ -285,7 +285,6 @@ void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList,
       std::shared_ptr<GeomAPI_Pnt2d> aPnt = PartSet_Tools::getCoincedencePoint(aConstrFeature);
       if (aPnt.get() == NULL)
         return;
-      gp_Pnt aP = aPnt->impl<gp_Pnt>();
       if (theRefPnt->isEqual(aPnt) && (!theOutList.contains(aConstrFeature))) {
         theOutList.append(aConstrFeature);
       }
@@ -317,11 +316,9 @@ void PartSet_MenuMgr::onLineDetach(QAction* theAction)
   if (aToDelFeatures.size() > 0) {
     XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myModule->workshop());
     XGUI_Workshop* aWorkshop = aConnector->workshop();
-    ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation();
 
     ModuleBase_Operation* anOpAction =
       new ModuleBase_Operation(tr("Detach %1").arg(aLine->data()->name().c_str()), myModule);
-    bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation);
     XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr();
     // the active nested sketch operation should be aborted unconditionally
     // the Delete action should be additionally granted for the Sketch operation
@@ -384,7 +381,6 @@ void PartSet_MenuMgr::setAuxiliary(const bool isChecked)
   XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr();
   if (isUseTransaction) {
     anOpAction = new ModuleBase_Operation(anAction->text(), myModule);
-    bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation);
 
     bool isCommitted;
     if (!anOpMgr->canStartOperation(anOpAction->id(), isCommitted))
@@ -518,7 +514,6 @@ void PartSet_MenuMgr::onActivateAllParts()
 
   DocumentPtr aDoc = aMgr->moduleDocument();
   int aNbParts = aDoc->size(ModelAPI_ResultPart::group());
-  bool isActivated = false;
   QList<ResultPartPtr> aPartsToLoad;
   for (int i = 0; i < aNbParts; i++) {
     ObjectPtr aObj = aDoc->object(ModelAPI_ResultPart::group(), i);
index e9b14cd7665fb68d03bd8f1efd08b158d270c3e6..969ffe1ac6e102842bb06764c7f7572d159945b6 100644 (file)
@@ -155,18 +155,15 @@ extern "C" PARTSET_EXPORT ModuleBase_IModule* createModule(ModuleBase_IWorkshop*
 //******************************************************
 PartSet_Module::PartSet_Module(ModuleBase_IWorkshop* theWshop)
 : ModuleBase_IModule(theWshop),
+  myIsOperationIsLaunched(false),
   myVisualLayerId(0),
-  myRoot(0),
-  myIsOperationIsLaunched(false)
+  myRoot(0)
 {
   new PartSet_IconFactory(this);
 
   mySketchMgr = new PartSet_SketcherMgr(this);
   mySketchReentrantMgr = new PartSet_SketcherReentrantMgr(theWshop);
 
-  XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(theWshop);
-  XGUI_Workshop* aWorkshop = aConnector->workshop();
-
   ModuleBase_IViewer* aViewer = theWshop->viewer();
   connect(aViewer, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)),
           this, SLOT(onKeyRelease(ModuleBase_IViewWindow*, QKeyEvent*)));
@@ -874,7 +871,6 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th
                                                            Config_WidgetAPI* theWidgetApi)
 {
   ModuleBase_IWorkshop* aWorkshop = workshop();
-  XGUI_Workshop* aXUIWorkshop = getWorkshop();
   ModuleBase_ModelWidget* aWgt = NULL;
   if (theType == "sketch-start-label") {
     PartSet_WidgetSketchLabel* aLabelWgt = new PartSet_WidgetSketchLabel(theParent, aWorkshop,
@@ -1156,8 +1152,6 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
      (aCurrentOperation->id() == "Measurement")))
   {
     double aLen = aView->Convert(SketcherPrs_Tools::getConfigArrowSize());
-
-    double aPrevLen = SketcherPrs_Tools::getArrowSize();
     SketcherPrs_Tools::setArrowSize(aLen);
     const double aCurScale = aViewer->activeView()->Camera()->Scale();
     aViewer->SetScale(aViewer->activeView(), aCurScale);
index 66d422e346005a7880a53890de055b23614cf1db..b6f0e49538adc4ffa0ec9bd40540366bd7430adf 100644 (file)
@@ -123,7 +123,6 @@ void PartSet_OperationPrs::Compute(
   thePresentation->Clear();
   bool aReadyToDisplay = !myShapeToPrsMap.IsEmpty();
 
-  XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(myWorkshop)->displayer();
   Handle(Prs3d_Drawer) aDrawer = Attributes();
   // create presentations on the base of the shapes
   BRep_Builder aBuilder;
@@ -144,7 +143,6 @@ void PartSet_OperationPrs::Compute(
         int aWidth = anIO->Width();
         /// workaround for zero width. Else, there will be a crash
         if (aWidth == 0) { // width returns of TSolid shape is zero
-          bool isDisplayed = !anIO->GetContext().IsNull();
           aWidth = PartSet_Tools::getAISDefaultWidth();// default width value
         }
         setWidth(aDrawer, aWidth);
@@ -244,8 +242,8 @@ void PartSet_OperationPrs::appendShapeIfVisible(ModuleBase_IWorkshop* theWorksho
                               GeomShapePtr theGeomShape,
                               QMap<ObjectPtr, QList<GeomShapePtr> >& theObjectShapes)
 {
-  XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(theWorkshop)->displayer();
-  // VSV: Do not use isVisible checking because it can be used when state "Show Only" is ON
+  //XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(theWorkshop)->displayer();
+  //// VSV: Do not use isVisible checking because it can be used when state "Show Only" is ON
   //if (XGUI_Displayer::isVisible(aDisplayer, theObject)) {
     if (theGeomShape.get()) {
       if (theObjectShapes.contains(theObject))
@@ -364,8 +362,6 @@ void PartSet_OperationPrs::getResultShapes(const FeaturePtr& theFeature,
   if (!theFeature.get())
     return;
 
-  XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(theWorkshop)->displayer();
-
   std::list<ResultPtr> aResults;
   ModelAPI_Tools::allResults(theFeature, aResults);
   std::list<ResultPtr>::const_iterator aRIt = aResults.begin(),
index 64e1aae6ff5667dc0b2f2d08e9f9627b0269d56c..a40d0f20806b1031454bdf431aaf23239614d4eb 100644 (file)
@@ -48,7 +48,7 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
 
-#define DEBUG_WIRE
+//#define DEBUG_WIRE
 
 #ifdef DEBUG_WIRE
 #include <TopTools_IndexedMapOfShape.hxx>
index 9f0571e11f828161a5f09e639ad0691128a545f3..aaa1ff6d4d2691785d3bf9c47ed343f419fa7386 100644 (file)
@@ -170,10 +170,17 @@ void getAttributesOrResults(const Handle(SelectMgr_EntityOwner)& theOwner,
 }
 
 PartSet_SketcherMgr::PartSet_SketcherMgr(PartSet_Module* theModule)
-  : QObject(theModule), myModule(theModule), myIsEditLaunching(false), myIsDragging(false),
-    myDragDone(false), myIsMouseOverWindow(false),
-    myIsMouseOverViewProcessed(true), myPreviousUpdateViewerEnabled(true),
-    myIsPopupMenuActive(false), myExternalPointsMgr(0), myNoDragMoving(false)
+  : QObject(theModule),
+    myModule(theModule),
+    myIsEditLaunching(false),
+    myIsDragging(false),
+    myDragDone(false),
+    myIsMouseOverWindow(false),
+    myIsMouseOverViewProcessed(true),
+    myIsPopupMenuActive(false),
+    myPreviousUpdateViewerEnabled(true),
+    myExternalPointsMgr(0),
+    myNoDragMoving(false)
 {
   ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
   ModuleBase_IViewer* aViewer = anIWorkshop->viewer();
@@ -681,7 +688,6 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve
 #endif
 
     Handle(V3d_View) aView = theWnd->v3dView();
-    gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), aView);
     Point aMousePnt;
     get2dPoint(theWnd, theEvent, aMousePnt);
 
@@ -1185,7 +1191,6 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation)
   qDebug(QString("startSketch: %1, %2").arg(anInfo.size()).arg(anInfoStr).toStdString().c_str());
 #endif
 
-  bool aHasPlane = false;
   std::shared_ptr<GeomAPI_Pln> aPln;
   aPln = PartSet_Tools::sketchPlane(myCurrentSketch);
   Handle(SelectMgr_Filter) aFilter = myModule->selectionFilter(SF_SketchPlaneFilter);
@@ -1501,8 +1506,6 @@ bool PartSet_SketcherMgr::canDisplayConstraint(const FeaturePtr& theFeature,
 
   std::string aKind = theFeature->getKind();
   if (aConstrIds.contains(QString(aKind.c_str()))) {
-    bool isTypedConstraint = false;
-
     switch (theState) {
       case PartSet_Tools::Dimensional: {
         bool isDistance = isDistanceKind(aKind);
@@ -1752,8 +1755,6 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
   std::map<AttributePtr, int> aSelectedAttributes = anInfo.myAttributes;
   std::set<ResultPtr> aSelectedResults = anInfo.myResults;
 
-  ModuleBase_IViewer* aViewer = theWorkshop->viewer();
-
   XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(theWorkshop);
   XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
 
@@ -1824,13 +1825,13 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
       // result owners are put in the list of selection only if local selected shapes were not
       // found
       if (aSelectedResults.find(aResult) != aSelectedResults.end()) {
-        for  ( Standard_Integer i = 1, n = aSelectedOwners.Extent(); i <= n; i++ ) {
+        for (Standard_Integer i = 1, n = aSelectedOwners.Extent(); i <= n; i++ ) {
           Handle(StdSelect_BRepOwner) anOwner =
-            Handle(StdSelect_BRepOwner)::DownCast(aSelectedOwners(i));
-          if ( anOwner.IsNull() || !anOwner->HasShape() || theOwnersToSelect.FindIndex(anOwner))
+              Handle(StdSelect_BRepOwner)::DownCast(aSelectedOwners(i));
+          if (anOwner.IsNull() || !anOwner->HasShape() || theOwnersToSelect.FindIndex(anOwner))
             continue;
-            // select whole result
-            theOwnersToSelect.Add(anOwner);
+          // select whole result
+          theOwnersToSelect.Add(anOwner);
         }
       }
     }
@@ -1864,8 +1865,8 @@ void PartSet_SketcherMgr::widgetStateChanged(int thePreviousState)
   ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
                                                                            (getCurrentOperation());
   if (aFOperation) {
-    if (PartSet_SketcherMgr::isSketchOperation(aFOperation) ||
-        isNestedSketchOperation(aFOperation) &&
+    if ((PartSet_SketcherMgr::isSketchOperation(aFOperation) ||
+         isNestedSketchOperation(aFOperation)) &&
         thePreviousState == ModuleBase_ModelWidget::ModifiedInPP) {
       FeaturePtr aFeature = aFOperation->feature();
       visualizeFeature(aFeature, aFOperation->isEditOperation(), canDisplayObject(aFeature));
@@ -1924,9 +1925,6 @@ void PartSet_SketcherMgr::visualizeFeature(const FeaturePtr& theFeature,
   if (isEditOperation || !theFeature.get())
     return;
 
-  ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
-  XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
-
   // 1. change visibility of the object itself, here the presentable object is processed,
   // e.g. constraints features
   //FeaturePtr aFeature = aFOperation->feature();
@@ -2065,8 +2063,6 @@ void PartSet_SketcherMgr::updateBySketchParameters(
     case PartSet_Tools::Geometrical:
     case PartSet_Tools::Dimensional: {
       if (aPrevState != theState) {
-        ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
-        XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
         int aNumberOfSubs = myCurrentSketch->numberOfSubs();
         for (int i = 0; i < aNumberOfSubs; i++) {
           FeaturePtr aSubFeature = myCurrentSketch->subFeature(i);
@@ -2091,6 +2087,8 @@ void PartSet_SketcherMgr::updateBySketchParameters(
       }
     }
     break;
+    default: // [to avoid compilation warning]
+      break;
   }
 }
 
@@ -2279,7 +2277,6 @@ bool isIncludeToResult(const ObjectPtr& theObject)
 std::vector<int> PartSet_SketcherMgr::colorOfObject(const ObjectPtr& theObject,
   const FeaturePtr& theFeature, bool isConstruction) const
 {
-  static const QStringList& aConstrIds = constraintsIdList();
   PartSet_OverconstraintListener* aOCListener = myModule->overconstraintListener();
   std::string aKind = theFeature->getKind();
 
index 6a646a1e8416a14d2d0dbfa591c33d8f2117d70f..0ebd810fa28880056e19f636d0b30442d4095804 100644 (file)
@@ -448,10 +448,7 @@ void PartSet_SketcherReentrantMgr::onVertexSelected()
 
 void PartSet_SketcherReentrantMgr::onAfterValuesChangedInPropertyPanel()
 {
-
   if (isInternalEditActive()) {
-    ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
-                                                       (myWorkshop->currentOperation());
     ModuleBase_ModelWidget* aWidget = (ModuleBase_ModelWidget*)sender();
     if (!aWidget->isModifiedInEdit().empty())
       restartOperation();
@@ -534,9 +531,9 @@ bool PartSet_SketcherReentrantMgr::startInternalEdit(const std::string& thePrevi
         QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
         for (int i = 0, aNb = aWidgets.size(); i < aNb && !aPreviousAttributeWidget; i++) {
           if (aWidgets[i]->attributeID() == thePreviousAttributeID) {
-          /// workaround for the same attributes used in different stacked widgets(attribute types)
-          if (ModuleBase_ToolBox::isOffToolBoxParent(aWidgets[i]))
-            continue;
+            // workaround for the same attributes used in different stacked widgets(attribute types)
+            if (ModuleBase_ToolBox::isOffToolBoxParent(aWidgets[i]))
+              continue;
             aPreviousAttributeWidget = aWidgets[i];
           }
         }
index 694aa7da45ce7d86a3eb7f078cfe5cfebd3caaed..f65ed4adb34084faff86b4cf32d573e43138bbc7 100644 (file)
@@ -683,8 +683,6 @@ bool PartSet_CoincidentAttr::isValid(const AttributePtr& theAttribute,
 
   // there is a check whether the feature contains a point and a linear edge or two point values
   std::string aParamA = theArguments.front();
-  SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
   AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
@@ -715,13 +713,13 @@ bool PartSet_CoincidentAttr::isValid(const AttributePtr& theAttribute,
         AttributePtr aAR = aRAttr->attr();
         if (aAR->id() != SketchPlugin_Arc::CENTER_ID()) // ignore constraint to center of arc
           aCoinList.insert(aConstrFeature);
-          QList<bool> anIsAttributes;
-          PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
-                                          SketchPlugin_ConstraintCoincidence::ENTITY_A(),
-                                          anIsAttributes);
-          PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
-                                          SketchPlugin_ConstraintCoincidence::ENTITY_B(),
-                                          anIsAttributes);
+        QList<bool> anIsAttributes;
+        PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
+                                        SketchPlugin_ConstraintCoincidence::ENTITY_A(),
+                                        anIsAttributes);
+        PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
+                                        SketchPlugin_ConstraintCoincidence::ENTITY_B(),
+                                        anIsAttributes);
       }
     }
     // if there is no coincidence then it is not valid
index 5819a5f6a72b7cd7d086de99e3ebc2997e3a9738..b6a17e16bca8bbffe03025eee40e111d05d1be6c 100644 (file)
@@ -87,7 +87,10 @@ PartSet_WidgetBSplinePoints::PartSet_WidgetBSplinePoints(QWidget* theParent,
   myBox->setFlat(false);
   aMainLayout->addWidget(myBox);
 
-  bool aAcceptVariables = theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
+#ifdef _DEBUG
+  bool aAcceptVariables =
+#endif
+    theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
 
   // B-spline weights attribute
   myWeightsAttr = theData->getProperty("weights");
@@ -167,8 +170,6 @@ void PartSet_WidgetBSplinePoints::removeLastPoint()
 
 bool PartSet_WidgetBSplinePoints::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue)
 {
-  bool aValid = true;
-
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
   if (aModule->sketchReentranceMgr()->isInternalEditActive())
     return true; // when internal edit is started a new feature is created. I has not results, AIS
@@ -359,7 +360,7 @@ bool PartSet_WidgetBSplinePoints::restoreValueCustom()
   AttributeDoubleArrayPtr aWeightsArray = aData->realArray(myWeightsAttr);
 
   if (aPointArray->isInitialized()) {
-    while (myXSpin.size() < aPointArray->size())
+    while ((int)myXSpin.size() < aPointArray->size())
       createNextPoint();
 
     std::vector<ModuleBase_LabelValue*>::iterator aXIt = myXSpin.begin();
index af34ee022fc55a304feff56fc397113925c9c9cb..c8068e18ca7b7a6d77f456c2b45c8ef7cdd8f7a1 100644 (file)
@@ -106,43 +106,21 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
   myGroupBox = new QGroupBox(aPageName, theParent);
   myGroupBox->setFlat(false);
 
-  bool aAcceptVariables = theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
+#ifdef _DEBUG
+  bool aAcceptVariables =
+#endif
+    theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
 
   QGridLayout* aGroupLay = new QGridLayout(myGroupBox);
   ModuleBase_Tools::adjustMargins(aGroupLay);
   aGroupLay->setSpacing(2);
   aGroupLay->setColumnStretch(1, 1);
-  {
-    QLabel* aLabel = new QLabel(myGroupBox);
-
-    myXSpin = new ModuleBase_LabelValue(myGroupBox, tr("X"));
-    //ModuleBase_ParamSpinBox(myGroupBox);
-    //myXSpin->setAcceptVariables(aAcceptVariables);
-    //myXSpin->setMinimum(-DBL_MAX);
-    //myXSpin->setMaximum(DBL_MAX);
-    //myXSpin->setToolTip(tr("X"));
-    aGroupLay->addWidget(myXSpin, 0, 1);
-
-    //connect(myXSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
-    //myXSpin->setValueEnabled(isValueEnabled());
-  }
-  {
-    //QLabel* aLabel = new QLabel(myGroupBox);
-    //aLabel->setText(tr("Y "));
-    //aGroupLay->addWidget(aLabel, 1, 0);
-
-    myYSpin = new ModuleBase_LabelValue(myGroupBox, tr("Y"));
-    //ModuleBase_ParamSpinBox(myGroupBox);
-    //myYSpin = new ModuleBase_ParamSpinBox(myGroupBox);
-    //myYSpin->setAcceptVariables(aAcceptVariables);
-    //myYSpin->setMinimum(-DBL_MAX);
-    //myYSpin->setMaximum(DBL_MAX);
-    //myYSpin->setToolTip(tr("Y"));
-    aGroupLay->addWidget(myYSpin, 1, 1);
-
-    //connect(myYSpin, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
-    //myYSpin->setValueEnabled(isValueEnabled());
-  }
+
+  myXSpin = new ModuleBase_LabelValue(myGroupBox, tr("X"));
+  aGroupLay->addWidget(myXSpin, 0, 1);
+  myYSpin = new ModuleBase_LabelValue(myGroupBox, tr("Y"));
+  aGroupLay->addWidget(myYSpin, 1, 1);
+
   QVBoxLayout* aLayout = new QVBoxLayout(this);
   ModuleBase_Tools::zeroMargins(aLayout);
   aLayout->addWidget(myGroupBox);
@@ -155,8 +133,6 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
 
 bool PartSet_WidgetPoint2D::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue)
 {
-  bool aValid = true;
-
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
   if (aModule->sketchReentranceMgr()->isInternalEditActive())
     return true; /// when internal edit is started a new feature is created. I has not results, AIS
@@ -662,7 +638,6 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
       }
     }
     if (!anExternal) {
-      bool isProcessed = false;
       GeomPnt2dPtr aPnt = PartSet_Tools::getPnt2d(aView, aShape, mySketch);
       if (aPnt && isFeatureContainsPoint(myFeature, aPnt->x(), aPnt->y())) {
         // when the point is selected, the coordinates of the point should be set into the attribute
index 3df7e1f3c6935d0d27bddb8f5f62294eff933386..f8cdc2c765bcb1916de30e14c3e08f2ba41cc783 100644 (file)
@@ -288,8 +288,6 @@ bool PartSet_WidgetSketchCreator::isSelectionMode() const
 bool PartSet_WidgetSketchCreator::hasSubObjects() const
 {
   bool aHasSubObjects = false;
-
-  bool aCanSetFocus = true;
   CompositeFeaturePtr aComposite = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myFeature);
   if (aComposite.get())
     aHasSubObjects = aComposite->numberOfSubs() > 0;
@@ -379,7 +377,6 @@ bool PartSet_WidgetSketchCreator::startSketchOperation(
   }
   // manually deactivation because the widget was not activated as has no focus acceptin controls
   deactivate();
-  bool aHidePreview = myPreviewPlanes->isPreviewDisplayed();
   myPreviewPlanes->erasePreviewPlanes(myWorkshop);
 
   // start edit operation for the sketch
index 171cf3abc09f3d1a10a6eb922479634c4d94857d..f0ec77b085b9f22bd1581514edecf4a6ccc1c94e 100644 (file)
@@ -409,9 +409,6 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
   if (aModule)
     aModule->onViewTransformed();
 
-  // 6. Update sketcher actions
-  XGUI_ActionsMgr* anActMgr = aWorkshop->actionsMgr();
-
   myWorkshop->updateCommandStatus();
   aWorkshop->selector()->clearSelection();
   myWorkshop->viewer()->update();
index 5d6c24c1224d1a5ed65f44ce85e5f9231760fe13..245b471f260e47d96387b0e5e111e2628a921017 100644 (file)
@@ -159,7 +159,6 @@ void PrimitivesPlugin_Box::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxA
   theBoxAlgo->prepareNamingFaces();
 
   // Insert to faces
-  int num = 1;
   std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
     theBoxAlgo->getCreatedFaces();
   for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator it = listOfFaces.begin();
index 634c5e4a9915456eaceb08e79ba0da96f4cb1403..90d662044693da413618788f8d56a84eefdee81f 100644 (file)
@@ -182,7 +182,6 @@ void PrimitivesPlugin_Torus::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Torus> the
 
   // Insert to faces
   // Naming for faces
-  int num = 1;
   std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
       theTorusAlgo->getCreatedFaces();
   for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator it = listOfFaces.begin();
index 0cd96374cdeb1a27184df9232c583c408c1a5c22..efdddb88e124d6bd2f8003829b06c16361a34a9a 100644 (file)
@@ -184,17 +184,26 @@ void SHAPERGUI::initialize(CAM_Application* theApp)
 
   QString aToolName = tr("Inspection");
   int aTool = createTool(aToolName);
-  int aToolId = createTool(myWhatIsAction, aTool);
+#ifdef _DEBUG
+  int aToolId =
+#endif
+    createTool(myWhatIsAction, aTool);
   registerCommandToolbar(aToolName, aId);
 
   // Define Edit toolbars command
   aId = getNextCommandId();
   //myActionsList.append(aId); Do not use it for editing of toolbars
   aTip = tr("Edit toolbars of the module");
-  QAction* aAction = createAction(aId, aTip, QIcon(":pictures/configure_toolbars.png"),
+#ifdef _DEBUG
+  QAction* aAction =
+#endif
+    createAction(aId, aTip, QIcon(":pictures/configure_toolbars.png"),
     tr("Edit toolbars..."), aTip, QKeySequence(), aDesk, false, this, SLOT(onEditToolbars()));
   int aEditMenu = createMenu(tr("MEN_DESK_EDIT"), -1, -1, 30);
-  int aEditItem = createMenu(aId, aEditMenu);
+#ifdef _DEBUG
+  int aEditItem =
+#endif
+    createMenu(aId, aEditMenu);
 
   // Initialize viewer proxy if OCC viewer is already exist
   ViewManagerList aOCCViewManagers;
@@ -655,12 +664,18 @@ QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theTBNam
   aAction->setData(theId);
 
   int aWBMenu = createMenu(theWBName, -1, -1, 30/*10-Window, 1000 - Help*/);
-  int aItemId = createMenu(aId, aWBMenu);
+#ifdef _DEBUG
+  int aItemId =
+#endif
+    createMenu(aId, aWBMenu);
   if (isAddSeparator)
     createMenu(separator(), aWBMenu);
 
   int aWBTool = createTool(theTBName, theTBName);
-  int aToolId = createTool(aId, aWBTool);
+#ifdef _DEBUG
+  int aToolId =
+#endif
+    createTool(aId, aWBTool);
   registerCommandToolbar(theTBName, aId);
   if (isAddSeparator) {
     createTool(separator(), aWBTool);
@@ -697,7 +712,10 @@ QAction* SHAPERGUI::addFeatureOfNested(const QString& theWBName,
   createMenu(separator(), aWBMenu); /// nested action is always separated of others
 
   int aWBTool = createTool(theWBName, theWBName);
-  int aToolId = createTool(anAction, aWBTool);
+#ifdef _DEBUG
+  int aToolId =
+#endif
+    createTool(anAction, aWBTool);
   registerCommandToolbar(theWBName, aItemId);
   createTool(separator(), aWBTool); /// nested action is always separated of others
   registerCommandToolbar(theWBName, -1);
@@ -1055,7 +1073,10 @@ void SHAPERGUI::saveToolbarsConfig()
     return;
   // Save toolbars configuration into map
   QMap<QString, QStringList> aToolbarsConfig;
-  QtxActionToolMgr* aMgr = toolMgr();
+#ifdef _DEBUG
+  QtxActionToolMgr* aMgr =
+#endif
+    toolMgr();
   QStringList aToolbars = myToolbars.keys();
   QIntList aActionsIds;
   foreach(QString aName, aToolbars) {
index 50b2462bc477cd7a17c8c31d728e5aea5ec111bd..ebb553221e09192041e3c06aa5102ab20ddec376 100644 (file)
@@ -68,7 +68,6 @@ bool SHAPERGUI_DataModel::open(const QString& thePath, CAM_Study* theStudy, QStr
   LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>( myModule->application()->activeStudy() );
   QString aNewTmpDir = aStudy->GetTmpDir("", false).c_str();
 
-  bool isDone = true;
   QDir aDir(aTmpDir);
   QStringList aFiles = aDir.entryList(QDir::Files);
   QStringList::const_iterator anIt = aFiles.begin(), aLast = aFiles.end();
index e6f35c488098a25ed75e59cdce91e3d705244165..5118208f101aa5ce4001bcaa9f0cdb82eabf6a37 100644 (file)
@@ -42,7 +42,7 @@ class SHAPERGUI_CommandIdItem : public QListWidgetItem
 {
 public:
   SHAPERGUI_CommandIdItem(QListWidget* theParent, int theId, SHAPERGUI* theModule)
-    : QListWidgetItem(theParent), myId(theId), myModule(theModule) {}
+    : QListWidgetItem(theParent), myModule(theModule), myId(theId) {}
 
 
   virtual QVariant data(int theRole) const {
index a946a1c833171743883a7f77487dfc53a89425b1..6f171afb140df204b094145120de32c480b91534 100644 (file)
@@ -59,6 +59,8 @@ public:
   /// Initializes the algorithm
   SELECTOR_EXPORT Selector_Algo();
 
+  virtual ~Selector_Algo() {}
+
   /// Initializes the selector structure on the label.
   /// Stores the name data to restore after modification.
   /// \param theContext whole shape that contains the selected sub-shape
index b03621166b56bbf744600a2686795cde196991e8..8b5c537ed33924c9416dddb19f8a750211bb5b0e 100644 (file)
@@ -70,7 +70,6 @@ bool Selector_Container::restore()
     return false;
   myShapeType = TopAbs_ShapeEnum(aShapeTypeAttr->Get());
   // restore sub-selectors
-  bool aSubResult = true;
   for(TDF_ChildIterator aSub(label(), false); aSub.More(); aSub.Next()) {
     Selector_Algo* aSubSel = restoreByLab(aSub.Value(), baseDocument());
     if (!append(aSubSel, false)) {
@@ -161,6 +160,8 @@ bool Selector_Container::solve(const TopoDS_Shape& theContext)
     aResult = aWire;
     break;
   }
+  default:
+    break;
   }
   TopoDS_ListOfShape aSubSelectorShapes;
   std::list<Selector_Algo*>::const_iterator aSubSel = list().cbegin();
index e492ab8d315205697eab94112c7f5eb66eed8dbd..0035d48f086b75f46dec9a85c9bd0445e83dc7e3 100644 (file)
@@ -273,7 +273,6 @@ bool Selector_FilterByNeighbors::restore()
     myNBLevel.push_back(anArray->Value(anIndex));
   }
   // restore sub-selectors
-  bool aSubResult = true;
   for(TDF_ChildIterator aSub(label(), false); aSub.More(); aSub.Next()) {
     Selector_Algo* aSubSel = restoreByLab(aSub.Value(), baseDocument());
     if (!append(aSubSel, false)) {
@@ -282,7 +281,7 @@ bool Selector_FilterByNeighbors::restore()
       // some selector fails, try to use rest selectors, myNBLevel becomes negative: unused
       if (myNBLevel.size() > list().size()) {
         std::list<int>::iterator aListIter = myNBLevel.begin();
-        for(int a = 0; a < list().size(); a++)
+        for(size_t a = 0; a < list().size(); a++)
           aListIter++;
         *aListIter = -*aListIter;
         list().push_back(NULL);
index a104911deff98d68d6263feda3a8c64bfd91f018..49b0764d7b593cc758185f1d7c69c72054b986ec 100644 (file)
@@ -168,7 +168,6 @@ bool Selector_Intersect::restore()
     return false;
   myShapeType = TopAbs_ShapeEnum(aShapeTypeAttr->Get());
   // restore sub-selectors
-  bool aSubResult = true;
   for(TDF_ChildIterator aSub(label(), false); aSub.More(); aSub.Next()) {
     Selector_Algo* aSubSel = restoreByLab(aSub.Value(), baseDocument());
     if (!append(aSubSel, false)) {
index 6d46dbd3a07a34c9a2f3b61221e6bad5c4fe4a11..7d36c8f5efced8545862901892698581922a36d2 100644 (file)
@@ -25,7 +25,7 @@
 #include <string>
 
 /// Size of the list of constraint attributes
-const unsigned int CONSTRAINT_ATTR_SIZE = 4;
+const int CONSTRAINT_ATTR_SIZE = 4;
 
 /** \class SketchPlugin_Constraint
  *  \brief Abstract interface to the SketchPlugin_ConstraintBase
index 41fc3b9bb0c97892cb3b4081e0027ba38d26d453..646d93a5dcd2207bf4b6d7fadce8407a973f0f37 100644 (file)
@@ -83,14 +83,6 @@ void SketchPlugin_ConstraintLength::execute()
         GeomDataAPI_Point2D>(aFeature->data()->attribute(SketchPlugin_Line::END_ID()));
 
     if (aPoint1.get() && aPoint2.get()) {
-      double aLenght = aPoint1->pnt()->distance(aPoint2->pnt());
-
-      //std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
-      //    ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-      //if(!aValueAttr->isInitialized()) {
-      //  aValueAttr->setValue(aLenght);
-      //}
-
       // the value should to be computed here, not in the getAISObject
       // in order to change the model value
       // inside the object transaction. This is important for creating a constraint by preselection.
index a8dda2fa8ab45817c0f6253e8f80f10c0e717f10..2acbc1ce6989f13e112df4dc11611282ad471ddc 100644 (file)
@@ -76,27 +76,6 @@ void SketchPlugin_ConstraintRadius::execute()
       ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
   FeaturePtr aFeature = ModelAPI_Feature::feature(aRef->object());
   if (aFeature) {
-    double aRadius = 0;
-    std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
-    if (aFeature->getKind() == SketchPlugin_Circle::ID()) {
-      AttributeDoublePtr anAttribute = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
-          aData->attribute(SketchPlugin_Circle::RADIUS_ID()));
-      if (anAttribute)
-        aRadius = anAttribute->value();
-    } else if (aFeature->getKind() == SketchPlugin_Arc::ID()) {
-      std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
-          GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::CENTER_ID()));
-      std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
-          GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Arc::START_ID()));
-      if (aCenterAttr && aStartAttr)
-        aRadius = aCenterAttr->pnt()->distance(aStartAttr->pnt());
-    }
-    //std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
-    //    ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-    //if(!aValueAttr->isInitialized()) {
-    //  aValueAttr->setValue(aRadius);
-    //}
-
     // the value should to be computed here,
     // not in the getAISObject in order to change the model value
     // inside the object transaction. This is important for creating a constraint by preselection.
index 924af019b5a55da0a27a90c4d87e2e7a930408fc..54f6805ba73abf53dc5005228db23b543b06066b 100644 (file)
@@ -81,7 +81,7 @@ static std::set<FeaturePtr> findFeaturesToRemove(const FeaturePtr theFeature,
                                                  const AttributePtr theAttribute);
 
 SketchPlugin_Fillet::SketchPlugin_Fillet()
-: myFilletCreated(false), myIsReversed(false)
+: myIsReversed(false), myFilletCreated(false)
 {
   myIsNotInversed[0] = myIsNotInversed[1] = true;
 }
index f74c9745c659c8b20c614fdbccba69231bbb8657..6e453b9c7f07a471c47fc848949afee136459f40 100644 (file)
@@ -397,7 +397,6 @@ AISObjectPtr SketchPlugin_MacroCircle::getAISObject(AISObjectPtr thePrevious)
 }
 
 void SketchPlugin_MacroCircle::attributeChanged(const std::string& theID) {
-  double aRadius = 0.0;
   // If circle type switched reset all attributes.
   if(theID == CIRCLE_TYPE()) {
     SketchPlugin_Tools::resetAttribute(this, CENTER_POINT_ID());
index 4a066288c334c2016251866ceb8278719399d25c..e5d14832367743212d904f1c15ecf5e6db4bb2f2 100644 (file)
@@ -246,7 +246,7 @@ private:
         continue; // already processed
       theCoincidences.insert(*aCIt);
       // iterate on coincident attributes
-      for (int i = 0, aPtInd = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {
+      for (int i = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {
         AttributeRefAttrPtr aRefAttr = (*aCIt)->refattr(SketchPlugin_Constraint::ATTRIBUTE(i));
         if (aRefAttr && !aRefAttr->isObject())
         {
index 6cb54d681ea70db15c2c4f4e2f62761696f6ed73..53ca4deb1de651b370366bff5acd2e00965f6110 100644 (file)
@@ -76,9 +76,6 @@
 
 static const double PI = 3.141592653589793238463;
 
-static const std::string OPERATION_HIGHLIGHT_COLOR() { return "128, 0, 0"; }
-static const std::string OPERATION_REMOVE_FEATURE_COLOR() { return "255, 174, 201"; }
-
 SketchPlugin_Trim::SketchPlugin_Trim()
 {
 }
index b4463445b872b31ae33eb0a11fd67735a96a596b..0597d95a09e726865f7986c6a406b3820883444d 100644 (file)
@@ -157,8 +157,6 @@ bool SketchPlugin_TangentAttrValidator::isValid(const AttributePtr& theAttribute
 
   // there is a check whether the feature contains a point and a linear edge or two point values
   std::string aParamA = theArguments.front();
-  SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
   FeaturePtr anAttributeFeature =
     std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
@@ -255,8 +253,6 @@ bool SketchPlugin_PerpendicularAttrValidator::isValid(const AttributePtr& theAtt
   }
 
   std::string aParamA = theArguments.front();
-  SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
   FeaturePtr anOwner = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
   AttributeRefAttrPtr aRefAttr =
@@ -447,8 +443,6 @@ bool SketchPlugin_CoincidenceAttrValidator::isValid(const AttributePtr& theAttri
 
   // there is a check whether the feature contains a point and a linear edge or two point values
   std::string aParamA = theArguments.front();
-  SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
   FeaturePtr aConstraint = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
   AttributeRefAttrPtr aRefAttrA = aConstraint->data()->refattr(aParamA);
@@ -823,8 +817,6 @@ bool SketchPlugin_MiddlePointAttrValidator::isValid(const AttributePtr& theAttri
 
   // there is a check whether the feature contains a point and a linear edge or two point values
   std::string aParamA = theArguments.front();
-  SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
   FeaturePtr anAttributeFeature =
     std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
index b363fdfc163690efb813328b365f73fee89027dd..5d626ed8c54f72847fd3b32d6cf3e38cef13dbba 100644 (file)
@@ -54,11 +54,15 @@ extern void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension);
 
 SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
-  SketchPlugin_Sketch* theSketcher)
-: AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)), myConstraint(theConstraint),
+                                     SketchPlugin_Sketch* theSketcher)
+: AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)),
+  myConstraint(theConstraint),
   mySketcher(theSketcher),
-  myFirstPoint(gp_Pnt(0,0,0)), myCenterPoint(gp_Pnt(1,0,0)), mySecondPoint(gp_Pnt(0,1,0)),
-  myValue(90., false, ""), myFlyOutPoint(0, 0.5, 0)
+  myFirstPoint(gp_Pnt(0,0,0)),
+  mySecondPoint(gp_Pnt(0,1,0)),
+  myCenterPoint(gp_Pnt(1, 0, 0)),
+  myFlyOutPoint(0, 0.5, 0),
+  myValue(90., false, "")
 {
   myAspect = new Prs3d_DimensionAspect();
   myAspect->MakeArrows3d(false);
index bb818cf696a689d863a391f07c41ee126a9a4060..ec96adf239924a5c647449aa3c9f0b316d9145d4 100644 (file)
@@ -64,7 +64,6 @@ bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   if (anAttrC.get() == NULL)
     return aReadyToDisplay;
 
-  SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
   int aNb = anAttrB->size();
   // If size of source objects and mirrored ones is not equal then the constraint is not computed
   if (aNb != anAttrC->size())
index c8c94c68a196dc8b4155874d54d2e3a989986d50..c5c949ffdf484e2466051ea8eae14b683706e64d 100644 (file)
@@ -424,7 +424,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
   gp_Vec aVecPos;
   // If number of angle less then number of symbols then each symbol can be placed
   // directly inside of the angle
-  if (aAngles.size() >= aPos[1] && !aVectors.empty()) {
+  if ((int)aAngles.size() >= aPos[1] && !aVectors.empty()) {
     int aId = aPos[0];
     aVecPos = *(std::next(aVectors.begin(), aId));
 
@@ -439,9 +439,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
   double aAng;
   std::list<double>::const_iterator aItAng;
 
-  double aAngPos;
   bool aHasPlace = false;
-  //int aIntId = 0; // a position inside a one sector
   while (aPosCount < aPos[1]) {
     for (aItAng = aAngles.cbegin(), aItVec = aVectors.cbegin();
          aItAng != aAngles.cend(); ++aItAng, ++aItVec) {
@@ -451,9 +449,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPointPosition(
 
       if ((!aHasPlace) && (aPosCount >= (aPos[0] + 1))) {
         aHasPlace = true;
-        aAngPos = (*aItAng);
         aVecPos = (*aItVec);
-        //aIntId = aPos[0] - (aPosCount - Nb);
       }
     }
     if (aPosCount < aPos[1]) {
index 465633f921b5155e0db5e53fc4918f32386863c5..96eaade662fa5fa7304f258cdcd6cb50f8807b1d 100644 (file)
@@ -119,9 +119,10 @@ std::map<const char*, Handle(Image_AlienPixMap)> SketcherPrs_SymbolPrs::myIconsM
 
 SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint,
   SketchPlugin_Sketch* theSketcher)
- : AIS_InteractiveObject(), myConstraint(theConstraint),
-   myIsCustomColor(false),
-   mySketcher(theSketcher)
+ : AIS_InteractiveObject(),
+   myConstraint(theConstraint),
+   mySketcher(theSketcher),
+   myIsCustomColor(false)
 {
   SetAutoHilight(Standard_False);
 }
@@ -229,8 +230,6 @@ void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup,
 
   std::shared_ptr<GeomAPI_Pnt> aPnt1 = aEdge->firstPoint();
   std::shared_ptr<GeomAPI_Pnt> aPnt2 = aEdge->lastPoint();
-  gp_Pnt aP1 = aPnt1->impl<gp_Pnt>();
-  gp_Pnt aP2 = aPnt2->impl<gp_Pnt>();
 
   // Draw line by two points
   Handle(Graphic3d_ArrayOfSegments) aLines = new Graphic3d_ArrayOfSegments(2, 1);
index 625e54445824129c2a16565b78e289ae8fa4fdee..39f58930aabc17831dcbd01d6234a00d77a6127e 100644 (file)
 #endif
 #endif
 
+#if defined __GNUC__ || defined __clang__
+#define MAYBE_UNUSED __attribute__((unused))
+#else
+#define MAYBE_UNUSED
+#endif
+
 #endif
index 691d0dbed6b2faab9d4b9a87ace67010214601c9..f0c7455ff72f80b913ce0b76c5eee0c3d6775662 100644 (file)
@@ -55,7 +55,7 @@ void XGUI_ActiveControlMgr::addSelector(XGUI_ActiveControlSelector* theSelector)
 //********************************************************************
 XGUI_ActiveControlSelector* XGUI_ActiveControlMgr::getSelector(const QString& theType)
 {
-  XGUI_ActiveControlSelector* aSelector;
+  XGUI_ActiveControlSelector* aSelector = 0;
   for (int i = 0, aCount = mySelectors.count(); i < aCount; i++)
   {
     if (mySelectors[i]->getType() != theType)
index ac16bf5f00d80eeb620b36aebf8d1b5311d5d7fc..a0f6a620e2523be397c922ebe17f1e60e953b68c 100644 (file)
@@ -62,8 +62,6 @@ XGUI_ColorDialog::XGUI_ColorDialog(QWidget* theParent)
 
 bool XGUI_ColorDialog::isRandomColor() const
 {
-  int anId = myButtonGroup->checkedId();
-
   return myButtonGroup->checkedId() == 1;
 }
 
index 7e99ec5ee894d4102344ff9f2fb281ab38034512..2972b77c5f9f00827d77d80e5144365cdf37d1a5 100644 (file)
@@ -525,7 +525,6 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
     aSelMgr->selection()->getSelected(ModuleBase_ISelection::Viewer);
   if (aPrsList.size() > 0) {
     bool isVisible = false;
-    bool isShading = false;
     bool canBeShaded = false;
     bool hasPlanar = false;
     ObjectPtr aObject;
@@ -536,9 +535,7 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
       GeomShapePtr aShape = aPrs->shape();
       if (aObject->isDisplayed()) {
         isVisible = true;
-        canBeShaded = myWorkshop->displayer()->canBeShaded(aObject);
-        isShading =
-          (myWorkshop->displayer()->displayMode(aObject) == XGUI_Displayer::Shading);
+        canBeShaded = aDisplayer->canBeShaded(aObject);
       }
       if (aShape.get()) {
         if (aShape->isPlanar()) {
index 7e47d3dd801092733ddfeff5ea9b0ae69132d194..8b7ff8c7efb13f776408994197b676eab967e99b 100644 (file)
@@ -210,7 +210,6 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
 
     QObjectPtrList aCreated;
     std::set<ObjectPtr>::const_iterator aIt;
-    bool aRebuildAll = false;
     for (aIt = aObjects.cbegin(); aIt != aObjects.cend(); aIt++) {
       ObjectPtr aObj = (*aIt);
       if (aObj->groupName() == ModelAPI_ResultField::group()) {
index 365717787f32673d3354683ad92582762cfb9546..e29ed81222fe651ac132be23f1193f157d9b37a2 100644 (file)
@@ -126,8 +126,10 @@ QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QS
 
 //**************************************************************
 XGUI_Displayer::XGUI_Displayer(XGUI_Workshop* theWorkshop)
-: myWorkshop(theWorkshop), myNeedUpdate(false),
-  myViewerBlockedRecursiveCount(0), myContextId(0)
+: myWorkshop(theWorkshop),
+  myViewerBlockedRecursiveCount(0),
+  myContextId(0),
+  myNeedUpdate(false)
 {
   BRepMesh_IncrementalMesh::SetParallelDefault(Standard_True);
 }
@@ -1144,7 +1146,7 @@ void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) th
           Handle(AIS_Shape) anOwnerPresentation =
                             Handle(AIS_Shape)::DownCast(anOwner->Selectable());
           const TopoDS_Shape& aPresentationShape = anOwnerPresentation->Shape();
-          if (aParameterShape.IsSame(anOwnerPresentation->Shape()) &&
+          if (aParameterShape.IsSame(aPresentationShape) &&
               !aCompsolidPresentations.Contains(anOwnerPresentation))
             aCompsolidPresentations.Add(anOwnerPresentation);
         }
index 42e3521a3ac42ed5877cd1d3ab8678bca92c5fbd..94be436698f30debbe81a5b7f1d08e0b22252eef 100644 (file)
@@ -52,13 +52,13 @@ const QString INVALID_VALUE = "invalid_action";
 
 XGUI_ErrorMgr::XGUI_ErrorMgr(QObject* theParent, ModuleBase_IWorkshop* theWorkshop)
   : ModuleBase_IErrorMgr(theParent),
+    myWorkshop(theWorkshop),
     myErrorDialog(0),
     myErrorLabel(0),
-    myWorkshop(theWorkshop),
-    myAcceptAllToolTip(""),
-    myAcceptAllStatusTip(""),
     myAcceptToolTip(""),
-    myAcceptStatusTip("")
+    myAcceptAllToolTip(""),
+    myAcceptStatusTip(""),
+    myAcceptAllStatusTip("")
 {
 }
 
@@ -69,7 +69,6 @@ XGUI_ErrorMgr::~XGUI_ErrorMgr()
 void XGUI_ErrorMgr::updateActions(const FeaturePtr& theFeature)
 {
   //update Ok Action and header of property panel if the current operation started for the feature
-  XGUI_ActionsMgr* anActionsMgr = workshop()->actionsMgr();
   ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
                                       (workshop()->operationMgr()->currentOperation());
   if (aFOperation && aFOperation->feature() == theFeature) {
@@ -144,7 +143,6 @@ bool XGUI_ErrorMgr::isApplyEnabled() const
 
 void XGUI_ErrorMgr::storeInitialActionValues()
 {
-  ModuleBase_ModelWidget* anActiveWidget = activeWidget();
   XGUI_ActionsMgr* anActionsMgr = workshop()->actionsMgr();
   QAction* anAcceptAllAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
   myAcceptAllToolTip = anAcceptAllAction->toolTip();
index 30b41d154a1e3109b501d8708b6784caf87bb94a..df5c2ddd796d062b33f4722fea73f2a1c6ebf59b 100644 (file)
@@ -88,12 +88,12 @@ void updateHiddenShapes(Handle(ModuleBase_ResultPrs) thePrs, const TopoDS_ListOf
 
 //********************************************************************
 XGUI_FacesPanel::XGUI_FacesPanel(QWidget* theParent, XGUI_Workshop* theWorkshop)
-  : QDockWidget(theParent), myIsActive(false), myWorkshop(theWorkshop)
+  : QDockWidget(theParent), myWorkshop(theWorkshop), myIsActive(false)
 {
   setWindowTitle(tr("Hide Faces"));
   setObjectName("Hide Faces");
 
-  QAction* aViewAct = toggleViewAction();
+  MAYBE_UNUSED QAction* aViewAct = toggleViewAction();
   setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
 
   QWidget* aContent = new QWidget(this);
@@ -469,7 +469,6 @@ bool XGUI_FacesPanel::processDelete()
   if (aSelectedIds.empty())
     return false;
 
-  bool isModified = false;
   std::set<ModuleBase_ViewerPrsPtr> aRestored;
   std::set<int>::const_iterator anIt;
   for (anIt = aSelectedIds.begin(); anIt != aSelectedIds.end(); anIt++) {
@@ -477,7 +476,6 @@ bool XGUI_FacesPanel::processDelete()
     if (aRestored.find(aPrs) == aRestored.end()) {
       aRestored.insert(aPrs);
       myItems.remove(*anIt);
-      isModified = true;
     }
   }
   std::map<ObjectPtr, TopoDS_ListOfShape> anObjectToShapes;
index 09d220a40c4ee8be69519e54b66535766131ad2e..a23cf7fda86a7242cb7dec8c0c6db842cf05e0f9 100644 (file)
@@ -68,7 +68,10 @@ void XGUI_HistoryMenu::setHistory(const QList<ActionInfo>& theActions)
 {
   myHistoryList->clear();
   foreach(ActionInfo anAct, theActions) {
-    QListWidgetItem* anItem = new QListWidgetItem(anAct.icon, anAct.text, myHistoryList);
+#ifdef _DEBUG
+    QListWidgetItem* anItem =
+#endif
+      new QListWidgetItem(anAct.icon, anAct.text, myHistoryList);
   }
 }
 
index 921709a9a219bd2fdb482eae908779968a419560..ed6be7433b04186d7832c1083a527b899508cfee 100644 (file)
@@ -367,6 +367,8 @@ void XGUI_InspectionPanel::setShapeParams(const TopoDS_Shape& theShape)
   case GeomAPI_Shape::COMPOUND:
     fillContainer(aShape);
     break;
+  default: // [to avoid compilation warning]
+    break;
   }
 }
 
index 3a333cf60d5dee853af4561a3c2cbed0914f8c26..4073ca6143e583d44743f133f0afb294eb9a4963 100644 (file)
@@ -57,7 +57,7 @@ class GeomAPI_Box;
 class ModuleBase_PageWidget;
 
 /// Internal name of property panel widget
-const static char* INSPECTION_PANEL = "inspection_panel_dock";
+MAYBE_UNUSED const static char* INSPECTION_PANEL = "inspection_panel_dock";
 
 /**
 * \ingroup GUI
index 9d269bcf19ac61856fd421d796fb12b7fd950cb6..53145b795c649ac643ae3bce946d6767aa29f02d 100644 (file)
@@ -174,7 +174,7 @@ void XGUI_MenuMgr::createFeatureActions()
       std::list<std::shared_ptr<Config_FeatureMessage> >::const_iterator aFIt =
         aFeaturesInfo.begin(), aFLast = aFeaturesInfo.end();
       size_t aFSize = aFeaturesInfo.size();
-      for(int i = 0; aFIt != aFLast; aFIt++, i++) {
+      for(size_t i = 0; aFIt != aFLast; aFIt++, i++) {
         std::shared_ptr<Config_FeatureMessage> aMessage = *aFIt;
         bool aUseSeparator = i == aFSize-1;
         QAction* aAction = buildAction(aMessage, aWchName, aUseSeparator);
index 60896931267bd174d6f51b786e31643f0b0a7901..8ea40ee6aa25902c6df59ab9434e47c859e2bfee 100644 (file)
@@ -124,7 +124,6 @@ ObjectPtr XGUI_ModuleConnector::findPresentedObject(const AISObjectPtr& theAIS)
 
 void XGUI_ModuleConnector::setSelected(const QList<ModuleBase_ViewerPrsPtr>& theValues)
 {
-  XGUI_Displayer* aDisp = myWorkshop->displayer();
   XGUI_ObjectsBrowser* aBrowser = myWorkshop->objectBrowser();
   if (theValues.isEmpty()) {
     myWorkshop->selector()->clearSelection();
index beb73a742bf21ec7a7b4e0378f233924c1ee4c78..139fe20b21be98840487c0b9681b6e453491f908 100644 (file)
@@ -125,7 +125,7 @@ private:
 
 XGUI_OperationMgr::XGUI_OperationMgr(QObject* theParent,
                                      ModuleBase_IWorkshop* theWorkshop)
-: QObject(theParent), myWorkshop(theWorkshop), mySHIFTPressed(false), myActiveMessageBox(0)
+: QObject(theParent), myWorkshop(theWorkshop), myActiveMessageBox(0), mySHIFTPressed(false)
 {
   /// we need to install filter to the application in order to react to 'Delete' key button
   /// this key can not be a short cut for a corresponded action because we need to set
@@ -388,7 +388,6 @@ bool XGUI_OperationMgr::isGrantedOperation(const QString& theId)
 
   QListIterator<ModuleBase_Operation*> anIt(myOperations);
   anIt.toBack();
-  ModuleBase_Operation* aPreviousOperation = 0;
   while (anIt.hasPrevious() && !isGranted) {
     ModuleBase_Operation* anOp = anIt.previous();
     if (anOp)
@@ -723,7 +722,6 @@ bool XGUI_OperationMgr::onKeyReleased(QObject *theObject, QKeyEvent* theEvent)
 bool XGUI_OperationMgr::onKeyPressed(QObject *theObject, QKeyEvent* theEvent)
 {
   // Let the manager decide what to do with the given key combination.
-  ModuleBase_Operation* anOperation = currentOperation();
   bool isAccepted = false;
   switch (theEvent->key()) {
     case Qt::Key_Escape: {
index 70f7c2956206010bad37582a952dad16a2ea9070..565f9d7734374d33be8b6190ae6ec20a466b53ee 100644 (file)
 
 XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent, XGUI_OperationMgr* theMgr)
     : ModuleBase_IPropertyPanel(theParent),
+    myPanelPage(NULL),
     myActiveWidget(NULL),
     myPreselectionWidget(NULL),
     myInternalActiveWidget(NULL),
-    myPanelPage(NULL),
     myOperationMgr(theMgr)
 {
   setWindowTitle(tr("Property Panel"));
-  QAction* aViewAct = toggleViewAction();
+  MAYBE_UNUSED QAction* aViewAct = toggleViewAction();
   setObjectName(PROP_PANEL);
   setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
 
index feec29d67f4a980cf7127779208e806b85e3e495..b8f5523e82389c09ecf9c9be2830b59363b428bc 100644 (file)
@@ -36,22 +36,22 @@ class ModuleBase_PageWidget;
 class XGUI_OperationMgr;
 
 /// Internal name of property panel widget
-const static char* PROP_PANEL = "property_panel_dock";
+MAYBE_UNUSED const static char* PROP_PANEL = "property_panel_dock";
 
 /// Internal name of Ok button
-const static char* PROP_PANEL_OK = "property_panel_ok";
+MAYBE_UNUSED const static char* PROP_PANEL_OK = "property_panel_ok";
 
 /// Internal name of Ok button
-const static char* PROP_PANEL_OK_PLUS = "property_panel_ok_plus";
+MAYBE_UNUSED const static char* PROP_PANEL_OK_PLUS = "property_panel_ok_plus";
 
 /// Internal name of Cancel button
-const static char* PROP_PANEL_CANCEL = "property_panel_cancel";
+MAYBE_UNUSED const static char* PROP_PANEL_CANCEL = "property_panel_cancel";
 
 /// Internal name of Help button
-const static char* PROP_PANEL_HELP = "property_panel_help";
+MAYBE_UNUSED const static char* PROP_PANEL_HELP = "property_panel_help";
 
 /// Internal name of Preview button
-const static char* PROP_PANEL_PREVIEW = "property_panel_preview";
+MAYBE_UNUSED const static char* PROP_PANEL_PREVIEW = "property_panel_preview";
 
 /**
 * \ingroup GUI
index 6f86809b230ae794d6855641c488a5aa5d25485b..e38e5c5b5bcaab09c3f9e51ebadb59e74436dd63 100644 (file)
@@ -358,7 +358,6 @@ QList<ModuleBase_ViewerPrsPtr> XGUI_Selection::getHighlighted() const
     return aPresentations;
 
   QList<size_t> aSelectedIds; // Remember of selected address in order to avoid duplicates
-  XGUI_Displayer* aDisplayer = myWorkshop->displayer();
   for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
     Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner();
     if (!anOwner.IsNull()) {
index 6b3547f8dc997c4a7e711747be510e2005b82354..1a11a9e27def0fa11cd08fe3fc7db1d01f8d215f 100644 (file)
@@ -229,17 +229,24 @@ void XGUI_SelectionActivate::activateObjects(const QIntList& theModes,
     return;
 
   AIS_ListIteratorOfListOfInteractive aLIt;
+#ifdef _DEBUG
   bool isActivationChanged = false;
+#endif
   for(aLIt.Initialize(aPrsList); aLIt.More(); aLIt.Next()) {
     anAISIO = aLIt.Value();
-    if (activate(anAISIO, false))
+    if (activate(anAISIO, false)) {
+#ifdef _DEBUG
       isActivationChanged = true;
+#endif
+    }
   }
 
   for(aLIt.Initialize(aPrsListToBeDeactivated); aLIt.More(); aLIt.Next()) {
     anAISIO = aLIt.Value();
     deactivateAIS(anAISIO);
+#ifdef _DEBUG
     isActivationChanged = true;
+#endif
   }
 }
 
@@ -423,7 +430,7 @@ bool XGUI_SelectionActivate::activate(const Handle(AIS_InteractiveObject)& theIO
   for (; itr.More(); itr.Next() ) {
     Standard_Integer aMode = itr.Value();
     aHasValidMode = aHasValidMode || aMode != -1;
-    int aShapeMode = (aMode > 8)? aMode : AIS_Shape::SelectionType(aMode);
+    //int aShapeMode = (aMode > 8)? aMode : AIS_Shape::SelectionType(aMode);
     if (!myActiveSelectionModes.contains(aMode)) {
       deactivateAIS(theIO, aMode);
       isDeactivated = true;
index e1aa196e4da0e4796be8291bfacf3fae7bee403d..94cc72a80e26a62e76a09216a0bfd9088568e5b9 100644 (file)
@@ -200,13 +200,13 @@ static QString MyImportPartFilter(QObject::tr("Part files (*.shaperpart);;All fi
 XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
     : QObject(),
       myModule(NULL),
-      mySalomeConnector(theConnector),
+      myObjectBrowser(0),
       myPropertyPanel(0),
-      myInspectionPanel(0),
       myFacesPanel(0),
-      myObjectBrowser(0),
-      myDisplayer(0)
-      //myViewerSelMode(TopAbs_FACE)
+      myDisplayer(0),
+      mySalomeConnector(theConnector),
+      //myViewerSelMode(TopAbs_FACE),
+      myInspectionPanel(0)
 {
   mySelector = new XGUI_SelectionMgr(this);
   myModuleConnector = new XGUI_ModuleConnector(this);
@@ -595,13 +595,11 @@ void XGUI_Workshop::onStartWaiting()
 //******************************************************
 void XGUI_Workshop::onAcceptActionClicked()
 {
-  QAction* anAction = dynamic_cast<QAction*>(sender());
   XGUI_OperationMgr* anOperationMgr = operationMgr();
   if (anOperationMgr) {
     ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
                                                     (anOperationMgr->currentOperation());
     if (aFOperation) {
-      //if (errorMgr()->canProcessClick(anAction, aFOperation->feature()))
       myOperationMgr->commitOperation();
     }
   }
@@ -610,7 +608,6 @@ void XGUI_Workshop::onAcceptActionClicked()
 //******************************************************
 void XGUI_Workshop::onAcceptPlusActionClicked()
 {
-  QAction* anAction = dynamic_cast<QAction*>(sender());
   XGUI_OperationMgr* anOperationMgr = operationMgr();
   if (anOperationMgr) {
     ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
@@ -2802,7 +2799,6 @@ void XGUI_Workshop::setNormalView(bool toInvert)
     aFace->computeSize(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
 
     Handle(V3d_View) aView = myViewerProxy->activeView();
-    double aScale = aView->Scale();
     aView->SetAt(aPos->x(), aPos->y(), aPos->z());
     aView->SetProj(aNormal->x(), aNormal->y(), aNormal->z());
     Bnd_Box aBox;
@@ -2815,7 +2811,7 @@ void XGUI_Workshop::setNormalView(bool toInvert)
 void XGUI_Workshop::registerValidators() const
 {
   SessionPtr aMgr = ModelAPI_Session::get();
-  ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+  MAYBE_UNUSED ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 }
 
 //**************************************************************
@@ -3145,7 +3141,6 @@ void XGUI_Workshop::onAutoApply()
 void XGUI_Workshop::updateAutoComputeState()
 {
   SessionPtr aMgr = ModelAPI_Session::get();
-  bool isComputeBlocked = aMgr->isAutoUpdateBlocked();
 #ifdef HAVE_SALOME
 //  QAction* aUpdateCmd;
 //  QList<QAction*> aCommands = mySalomeConnector->commandList();
@@ -3158,6 +3153,7 @@ void XGUI_Workshop::updateAutoComputeState()
 //  aUpdateCmd->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
 //    QIcon(":pictures/autoapply_start.png"));
 #else
+  bool isComputeBlocked = aMgr->isAutoUpdateBlocked();
   AppElements_MainMenu* aMenuBar = myMainWindow->menuObject();
   AppElements_Command* aUpdateCmd = aMenuBar->feature("AUTOCOMPUTE_CMD");
   aUpdateCmd->button()->setIcon(isComputeBlocked? QIcon(":pictures/autoapply_stop.png") :
index 5f83d9784a579259fe468d285ce4b1b2b622d251..537a38e182175bfc475a6b40bfd4819ba486c510 100644 (file)
@@ -86,7 +86,6 @@ XGUI_WorkshopListener::XGUI_WorkshopListener(XGUI_Workshop* theWorkshop)
   : myWorkshop(theWorkshop),
     myUpdatePrefs(false)
 {
-  XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
 }
 
 //******************************************************
@@ -430,7 +429,6 @@ void XGUI_WorkshopListener::
                  !anObject->isDisplayed();
     if (!aHide) { // check that this is not hidden result
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
-      bool isConcealed = aRes && aRes->isConcealed();
       aHide = aRes && aRes->isConcealed();
       // Hide the presentation with an empty shape. But isDisplayed state of the object should not
       // be changed to the object becomes visible when the shape becomes not empty
@@ -448,7 +446,7 @@ void XGUI_WorkshopListener::
     }
   }
 
-  bool isCustomized = customizeFeature(anObjects, aDisplayed);
+  MAYBE_UNUSED bool isCustomized = customizeFeature(anObjects, aDisplayed);
 
   //if (myObjectBrowser)
   //  myObjectBrowser->processEvent(theMsg);
@@ -522,7 +520,6 @@ bool XGUI_WorkshopListener::displayObject(ObjectPtr theObj)
     return aDisplayed;
 
   XGUI_Displayer* aDisplayer = aWorkshop->displayer();
-  int aNb = aDisplayer->objectsCount();
   return aDisplayer->display(theObj, false);
 }