From 4acb4f363e1ada7e10f19114c323e1bcdd839e23 Mon Sep 17 00:00:00 2001 From: Viktor Uzlov Date: Fri, 14 Aug 2020 16:23:51 +0300 Subject: [PATCH] fix warning "mismatch signed unsigned", "conversion variables", add commit struct "GUI_UNUSED(var)" --- src/CAM/CAM_Module.cxx | 3 +++ src/GLViewer/GLViewer_BaseObjects.cxx | 13 ++++++++++ src/GLViewer/GLViewer_Drawer.cxx | 6 ++--- src/GLViewer/GLViewer_Grid.cxx | 10 ++++++++ src/GLViewer/GLViewer_Group.cxx | 2 +- src/GLViewer/GLViewer_Selector2d.cxx | 1 + src/GLViewer/GLViewer_Text.cxx | 2 +- src/GLViewer/GLViewer_ToolTip.cxx | 2 +- src/GLViewer/GLViewer_Tools.cxx | 1 + src/GLViewer/GLViewer_ViewPort2d.cxx | 1 + src/GLViewer/GLViewer_Viewer.cxx | 2 ++ src/GLViewer/GLViewer_Viewer2d.cxx | 4 ++++ src/GLViewer/GLViewer_Widget.cxx | 5 ++-- src/HelpBrowser/HelpBrowser.cxx | 1 - src/Prs/SALOME_Prs.h | 2 +- src/QDS/QDS_ComboBox.cxx | 2 +- src/QDS/QDS_Datum.cxx | 3 ++- src/QDS/QDS_RadioBox.cxx | 2 +- src/Qtx/Qtx.cxx | 6 ++--- src/Qtx/QtxDoubleSpinBox.cxx | 2 +- src/SUIT/SUIT_DataBrowser.cxx | 2 ++ src/SUIT/SUIT_TreeModel.cxx | 1 + src/SUIT/SUIT_ViewWindow.cxx | 3 ++- src/SVTK/SALOME_Actor.cxx | 6 ++--- src/SVTK/SVTK_DeviceActor.cxx | 4 ++-- src/SVTK/SVTK_Hash.h | 2 +- src/SVTK/SVTK_ImageWriterMgr.cxx | 2 +- src/SVTK/SVTK_InteractorStyle.cxx | 2 +- src/SVTK/SVTK_Selector.cxx | 2 +- src/SVTK/SVTK_ViewModel.cxx | 24 +++++++++---------- src/Style/Style_Tools.cxx | 1 + src/VTKViewer/VTKViewer_Actor.cxx | 2 +- src/VTKViewer/VTKViewer_AppendFilter.cxx | 4 ++-- src/VTKViewer/VTKViewer_ArcBuilder.cxx | 2 +- src/VTKViewer/VTKViewer_ConvexTool.cxx | 10 ++++---- src/VTKViewer/VTKViewer_OpenGLHelper.cxx | 2 +- .../ViewerTools_FontWidgetBase.cxx | 2 ++ 37 files changed, 92 insertions(+), 49 deletions(-) diff --git a/src/CAM/CAM_Module.cxx b/src/CAM/CAM_Module.cxx index e68b56ac2..c4adb6476 100644 --- a/src/CAM/CAM_Module.cxx +++ b/src/CAM/CAM_Module.cxx @@ -1146,6 +1146,7 @@ void CAM_Module::updateModuleVisibilityState() { */ bool CAM_Module::activateOperation( int actionId ) { + //GUI_UNUSED(actionId); return false; } @@ -1156,6 +1157,7 @@ bool CAM_Module::activateOperation( int actionId ) */ bool CAM_Module::activateOperation( const QString& actionId ) { + //GUI_UNUSED(actionId); return false; } @@ -1167,6 +1169,7 @@ bool CAM_Module::activateOperation( const QString& actionId ) */ bool CAM_Module::activateOperation( const QString& actionId, const QString& pluginName ) { + //GUI_UNUSED(actionId); return false; } diff --git a/src/GLViewer/GLViewer_BaseObjects.cxx b/src/GLViewer/GLViewer_BaseObjects.cxx index db2c3875a..fa66857f6 100644 --- a/src/GLViewer/GLViewer_BaseObjects.cxx +++ b/src/GLViewer/GLViewer_BaseObjects.cxx @@ -425,6 +425,8 @@ GLboolean GLViewer_MarkerSet::unhighlight() GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull, GLboolean isCircle, GLboolean isShift ) { + //GUI_UNUSED(isFull); + //GUI_UNUSED(rect); if( !myIsVisible ) return false; // cout << "GLViewer_MarkerSet::select " << x << " " << y << endl; @@ -820,6 +822,7 @@ GLViewer_Polyline::GLViewer_Polyline( int number, float size, const QString& too myXCoord( 0 ), myYCoord( 0 ) { + //GUI_UNUSED(size); myHighFlag = GL_TRUE; myHNumbers.clear(); @@ -1006,6 +1009,8 @@ GLViewer_Drawer* GLViewer_Polyline::createDrawer() */ GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle ) { + //GUI_UNUSED(isCircle); + //GUI_UNUSED(tol); if( !myIsVisible ) return false; GLfloat xa, xb, ya, yb, l; @@ -1091,6 +1096,11 @@ GLboolean GLViewer_Polyline::unhighlight() GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull, GLboolean isCircle, GLboolean isShift ) { + //GUI_UNUSED(isCircle); + //GUI_UNUSED(isFull); + //GUI_UNUSED(isShift); + //GUI_UNUSED(rect); + //GUI_UNUSED(tol); if( !myIsVisible ) return false; GLfloat xa, xb, ya, yb, l; @@ -1624,6 +1634,9 @@ GLboolean GLViewer_TextObject::unhighlight() GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect rect, GLboolean isFull, GLboolean isCircle, GLboolean isShift ) { + //GUI_UNUSED(isFull); + //GUI_UNUSED(isShift); + //GUI_UNUSED(rect); if( !myIsVisible ) return false; diff --git a/src/GLViewer/GLViewer_Drawer.cxx b/src/GLViewer/GLViewer_Drawer.cxx index d46b9182a..f8b57c27e 100644 --- a/src/GLViewer/GLViewer_Drawer.cxx +++ b/src/GLViewer/GLViewer_Drawer.cxx @@ -161,7 +161,7 @@ bool GLViewer_TexFont::generateTexture() aFindFont.myIsItal = myQFont.italic(); aFindFont.myIsUndl = myQFont.underline(); aFindFont.myPointSize = myQFont.pointSize(); - aFindFont.myViewPortId = size_t(QGLContext::currentContext()); + aFindFont.myViewPortId = long(QGLContext::currentContext()); //!::iterator it = GLViewer_TexFont::BitmapFontCache.begin(); for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it ) { - if ( it.key().myViewPortId == (int)ctx && it.value() > listBase ) + if ( it.key().myViewPortId == (LONG_PTR)ctx && it.value() > listBase ) listBase = it.value(); } listBase += 256; diff --git a/src/GLViewer/GLViewer_Grid.cxx b/src/GLViewer/GLViewer_Grid.cxx index f8c8c4994..b46bf62d6 100644 --- a/src/GLViewer/GLViewer_Grid.cxx +++ b/src/GLViewer/GLViewer_Grid.cxx @@ -67,6 +67,16 @@ GLViewer_Grid::GLViewer_Grid( GLfloat width, GLfloat height, myLineWidth( (GLfloat)0.05 ), myCenterWidth( (GLfloat)1.5 ), myCenterRadius( (GLfloat)5.0 ), myScaleFactor( 10 ), myIsUpdate( GL_FALSE ) { + //GUI_UNUSED(height); + //GUI_UNUSED(width); + //GUI_UNUSED(winH); + //GUI_UNUSED(winW); + //GUI_UNUSED(xPan); + //GUI_UNUSED(xScale); + //GUI_UNUSED(xSize); + //GUI_UNUSED(yPan); + //GUI_UNUSED(yScale); + //GUI_UNUSED(ySize); myGridColor[0] = 0.5; myGridColor[1] = 0.5; myGridColor[2] = 0.5; diff --git a/src/GLViewer/GLViewer_Group.cxx b/src/GLViewer/GLViewer_Group.cxx index 53e862876..38bfe4cbb 100644 --- a/src/GLViewer/GLViewer_Group.cxx +++ b/src/GLViewer/GLViewer_Group.cxx @@ -56,7 +56,7 @@ bool GLViewer_Group::isEmpty() */ int GLViewer_Group::count() { - return myList.size(); + return (size_t)myList.size(); //!< TODO: conversion from size_t to int } /*! diff --git a/src/GLViewer/GLViewer_Selector2d.cxx b/src/GLViewer/GLViewer_Selector2d.cxx index e69441e5b..ea1c8405a 100644 --- a/src/GLViewer/GLViewer_Selector2d.cxx +++ b/src/GLViewer/GLViewer_Selector2d.cxx @@ -172,6 +172,7 @@ void GLViewer_Selector2d::unselectAll() */ void GLViewer_Selector2d::checkSelection( int selBefore, bool append, int aStatus ) { + //GUI_UNUSED(append); int selAfter = numSelected(); if ( selBefore > 0 && selAfter < 1 ) emit selSelectionCancel(); diff --git a/src/GLViewer/GLViewer_Text.cxx b/src/GLViewer/GLViewer_Text.cxx index e589e5a37..23c5359d9 100644 --- a/src/GLViewer/GLViewer_Text.cxx +++ b/src/GLViewer/GLViewer_Text.cxx @@ -70,7 +70,7 @@ int GLViewer_Text::getWidth() { int aResult = 0; QFontMetrics aFM( myQFont ); - for( uint i = 0; i < myText.length(); i++ ) + for( uint i = 0; i < (uint)myText.length(); i++ ) aResult += aFM.width( myText.at(i) ) + mySeparator; return aResult; } diff --git a/src/GLViewer/GLViewer_ToolTip.cxx b/src/GLViewer/GLViewer_ToolTip.cxx index a16897493..6b2491403 100644 --- a/src/GLViewer/GLViewer_ToolTip.cxx +++ b/src/GLViewer/GLViewer_ToolTip.cxx @@ -89,7 +89,7 @@ GLViewer_ObjectTip::~GLViewer_ObjectTip() */ bool GLViewer_ObjectTip::maybeTip( const QPoint &p ) { - + //GUI_UNUSED(p); GLViewer_Context* aContext = ((GLViewer_Viewer2d*)mypViewPort->getViewFrame()->getViewer())->getGLContext(); diff --git a/src/GLViewer/GLViewer_Tools.cxx b/src/GLViewer/GLViewer_Tools.cxx index 6fe7c717f..fb47ce486 100644 --- a/src/GLViewer/GLViewer_Tools.cxx +++ b/src/GLViewer/GLViewer_Tools.cxx @@ -516,6 +516,7 @@ GLViewer_LineField::~GLViewer_LineField() */ void GLViewer_LineField::addLine( FieldDim theDim, GLViewer_LineList* ) { + //GUI_UNUSED(theDim); //not implemented } diff --git a/src/GLViewer/GLViewer_ViewPort2d.cxx b/src/GLViewer/GLViewer_ViewPort2d.cxx index 4a120be98..c601b1fd9 100644 --- a/src/GLViewer/GLViewer_ViewPort2d.cxx +++ b/src/GLViewer/GLViewer_ViewPort2d.cxx @@ -826,6 +826,7 @@ void GLViewer_ViewPort2d::fitSelect() */ void GLViewer_ViewPort2d::fitAll( bool keepScale, bool withZ ) { + //GUI_UNUSED(withZ); //cout << "GLViewer_ViewPort2d::fitAll" << endl; float xa, xb, ya, yb; diff --git a/src/GLViewer/GLViewer_Viewer.cxx b/src/GLViewer/GLViewer_Viewer.cxx index 5d0ee8743..cfb5d5c2d 100644 --- a/src/GLViewer/GLViewer_Viewer.cxx +++ b/src/GLViewer/GLViewer_Viewer.cxx @@ -55,6 +55,7 @@ mySketcher( 0 ), myTransformer( 0 ), mySelMode( NoSelection ) { + //GUI_UNUSED(title); } /*! @@ -335,6 +336,7 @@ bool GLViewer_Viewer::eventFilter( QObject* o, QEvent* e ) */ void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status ) { + //GUI_UNUSED(bAdded); emit selectionChanged( status ); } diff --git a/src/GLViewer/GLViewer_Viewer2d.cxx b/src/GLViewer/GLViewer_Viewer2d.cxx index 8cfad13b5..539a7a7ac 100644 --- a/src/GLViewer/GLViewer_Viewer2d.cxx +++ b/src/GLViewer/GLViewer_Viewer2d.cxx @@ -115,6 +115,8 @@ void GLViewer_Viewer2d::onChangeBgColor() */ void GLViewer_Viewer2d::updateColors( QColor colorH, QColor colorS ) { + //GUI_UNUSED(colorH); + //GUI_UNUSED(colorS); // cout << "GLViewer_Viewer2d::updateColors" << endl; /* @@ -217,6 +219,8 @@ void GLViewer_Viewer2d::updateAll() */ void GLViewer_Viewer2d::updateDrawers( GLboolean update, GLfloat scX, GLfloat scY ) { + //GUI_UNUSED(scX); + //GUI_UNUSED(scY); // cout << "GLViewer_Viewer2d::updateDrawers" << endl; //myGLContext->updateScales( scX, scY ); diff --git a/src/GLViewer/GLViewer_Widget.cxx b/src/GLViewer/GLViewer_Widget.cxx index ed455c711..c2b3bc494 100644 --- a/src/GLViewer/GLViewer_Widget.cxx +++ b/src/GLViewer/GLViewer_Widget.cxx @@ -44,6 +44,7 @@ GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* name ): QGLWidget( parent, 0/*, WRepaintNoErase | WResizeNoErase*/ ) { + //GUI_UNUSED(name); myViewPort = ( GLViewer_ViewPort2d* )parent; myXPan = 0.0; @@ -401,7 +402,7 @@ void GLViewer_Widget::mouseReleaseEvent( QMouseEvent* e ) /*! Custom enter event handler */ -void GLViewer_Widget::enterEvent( QEvent* e ) +void GLViewer_Widget::enterEvent( QEvent* /*e*/ ) { updateGL(); } @@ -409,7 +410,7 @@ void GLViewer_Widget::enterEvent( QEvent* e ) /*! Custom leave event handler */ -void GLViewer_Widget::leaveEvent( QEvent* e ) +void GLViewer_Widget::leaveEvent( QEvent* /*e*/ ) { updateGL(); } diff --git a/src/HelpBrowser/HelpBrowser.cxx b/src/HelpBrowser/HelpBrowser.cxx index 3a86c257a..120ce8a3f 100644 --- a/src/HelpBrowser/HelpBrowser.cxx +++ b/src/HelpBrowser/HelpBrowser.cxx @@ -162,7 +162,6 @@ int main( int argc, char **argv ) #if defined(WIN32) && defined(UNICODE) LPWSTR *szArglist = NULL; int nArgs; - int i; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); helpfile = QString::fromWCharArray(szArglist[nArgs-1]); // Free memory allocated for CommandLineToArgvW arguments. diff --git a/src/Prs/SALOME_Prs.h b/src/Prs/SALOME_Prs.h index 1161e08c0..dba9132b2 100644 --- a/src/Prs/SALOME_Prs.h +++ b/src/Prs/SALOME_Prs.h @@ -307,7 +307,7 @@ public: //! \retval Return false. virtual bool isVisible( const Handle(SALOME_InteractiveObject)& ){ return false; } virtual void Repaint() {} //!< Null body here. - virtual void GetVisible( SALOME_ListIO& theList ) {} + virtual void GetVisible( SALOME_ListIO& theList ) {/*GUI_UNUSED(theList);*/} }; /*! diff --git a/src/QDS/QDS_ComboBox.cxx b/src/QDS/QDS_ComboBox.cxx index 33ef748bb..a5eeafa25 100644 --- a/src/QDS/QDS_ComboBox.cxx +++ b/src/QDS/QDS_ComboBox.cxx @@ -260,7 +260,7 @@ void QDS_ComboBox::setState( const bool on, const QList& ids, const bool ap bool changed = false; QMap aMap; - for ( uint i = 0; i < ids.count(); i++ ) + for ( uint i = 0; i < (uint)ids.count(); i++ ) aMap.insert( ids.at( i ), 0 ); for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it ) diff --git a/src/QDS/QDS_Datum.cxx b/src/QDS/QDS_Datum.cxx index b69d720ce..002b322c1 100644 --- a/src/QDS/QDS_Datum.cxx +++ b/src/QDS/QDS_Datum.cxx @@ -1424,6 +1424,7 @@ void QDS_Datum::initialize() */ void QDS_Datum::unitSystemChanged( const QString& unitSystem ) { + //GUI_UNUSED(initSystem); QString labText = label(); QString unitText = unitsToText( units() ); @@ -1883,7 +1884,7 @@ QString QDS_Datum::removeAccel( const QString& src ) { QString trg = src; - for ( uint i = 0; i < trg.length(); ) + for ( uint i = 0; i < (uint)trg.length(); ) { if ( trg.mid( i, 2 ) == QString( "&&" ) ) i += 2; diff --git a/src/QDS/QDS_RadioBox.cxx b/src/QDS/QDS_RadioBox.cxx index beaae1168..7b56d676b 100644 --- a/src/QDS/QDS_RadioBox.cxx +++ b/src/QDS/QDS_RadioBox.cxx @@ -161,7 +161,7 @@ void QDS_RadioBox::setState( const bool on, const QList& ids, const bool ap bool changed = false; QMap aMap; - for ( uint i = 0; i < ids.count(); i++ ) + for ( uint i = 0; i < (uint)ids.count(); i++ ) aMap.insert( ids.at( i ), 0 ); for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it ) diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index 6a3d61c33..66944d330 100644 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -589,7 +589,7 @@ bool Qtx::dos2unix( const QString& absName ) char inbuf[512], outbuf[512]; /* convert buffer */ - int nbread = ::fread( inbuf, 1, sizeof( inbuf ), src ); + int nbread = (int)::fread( inbuf, 1, sizeof( inbuf ), src ); //!< TODO: conversion from 'size_t' to 'int' for ( int incnt = 0; incnt < nbread; incnt++ ) { if ( waitingLF ) @@ -610,7 +610,7 @@ bool Qtx::dos2unix( const QString& absName ) waitingLF = ( inbuf[nbread - 1] == CR ); /* write converted buffer to temp file */ - int nbwri = ::fwrite( outbuf, 1, outcnt, tgt ); + int nbwri = (int)::fwrite( outbuf, 1, outcnt, tgt ); //!< TODO: conversion from 'size_t' to 'int' if ( nbwri != outcnt ) { ::fclose( src ); @@ -2143,7 +2143,7 @@ QString Qtx::qtDir( const QString& context ) QStringList vars = { "QT5_ROOT_DIR", "QT_ROOT_DIR", "QTDIR" }; QString qtPath; - for (uint i = 0; i < vars.length() && qtPath.isEmpty(); i++ ) { + for (uint i = 0; i < (uint)vars.length() && qtPath.isEmpty(); i++ ) { //!< TODO: mismatch signed/unsigned qtPath = getenv(vars[i]); } if ( !qtPath.isEmpty() && !context.isEmpty() ) diff --git a/src/Qtx/QtxDoubleSpinBox.cxx b/src/Qtx/QtxDoubleSpinBox.cxx index 7c8102ad8..6c3cb164d 100644 --- a/src/Qtx/QtxDoubleSpinBox.cxx +++ b/src/Qtx/QtxDoubleSpinBox.cxx @@ -326,7 +326,7 @@ QValidator::State QtxDoubleSpinBox::validate( QString& str, int& pos ) const state = v.validate( str, pos ); else { - if ( str.length() >= overhead && str.startsWith( pref ) && + if ( (uint)str.length() >= overhead && str.startsWith( pref ) && //!< TODO: mismatch signed/unsigned str.right( suff.length() ) == suff ) { QString core = str.mid( pref.length(), str.length() - overhead ); diff --git a/src/SUIT/SUIT_DataBrowser.cxx b/src/SUIT/SUIT_DataBrowser.cxx index d79c13c75..def245c6c 100644 --- a/src/SUIT/SUIT_DataBrowser.cxx +++ b/src/SUIT/SUIT_DataBrowser.cxx @@ -145,6 +145,7 @@ void SUIT_DataBrowser::setUpdateModified( const bool on ) */ void SUIT_DataBrowser::updateTree( SUIT_DataObject* obj, const bool autoOpen ) { + //GUI_UNUSED(autoOpen); SUIT_ProxyModel* m = qobject_cast( model() ); if ( m ) { m->updateTree( obj ); @@ -472,6 +473,7 @@ void SUIT_DataBrowser::onDblClicked( const QModelIndex& index ) */ void SUIT_DataBrowser::onExpanded( const QModelIndex& index ) { + //GUI_UNUSED(index); if (myResizeOnExpandItem) { adjustFirstColumnWidth(); adjustColumnsWidth(); diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index 4af8769d5..effb255dd 100644 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -1730,6 +1730,7 @@ QMimeData* SUIT_TreeModel::mimeData( const QModelIndexList& indexes ) const bool SUIT_TreeModel::dropMimeData( const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent ) { + //GUI_UNUSED(column); if ( action == Qt::IgnoreAction ) // do nothing with data return false; diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index 22c20b4c1..991926b98 100644 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -334,7 +334,7 @@ bool SUIT_ViewWindow::dropDownButtons() const */ int SUIT_ViewWindow::getId() const { - return int(long(this)); + return int(LONG_PTR(this)); } /*! @@ -456,6 +456,7 @@ void SUIT_ViewWindow::updateSyncViews() */ void SUIT_ViewWindow::onSynchronizeView( bool checked ) { + //GUI_UNUSED(checked); QAction* a = qobject_cast( sender() ); if ( a ) { synchronizeView( this, a->data().toInt() ); diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index cd2cb3510..59f60eab7 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -712,7 +712,7 @@ SALOME_Actor TColStd_MapOfInteger anIndexes; if(aMapIter != aVectorIdsMap.end()){ const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second; - vtkIdType anEnd = aVectorIds.size(); + vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int for(vtkIdType anId = 0; anId < anEnd; anId++ ) { int aPointId = aVectorIds[anId]; if( aPointId >= 0 && mySelector->IsValid( this, aPointId, true ) ) { @@ -788,7 +788,7 @@ SALOME_Actor TColStd_MapOfInteger anIndexes; if(aMapIter != aVectorIdsMap.end()){ const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second; - vtkIdType anEnd = aVectorIds.size(); + vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int for(vtkIdType anId = 0; anId < anEnd; anId++ ) { int aCellId = aVectorIds[anId]; if ( !mySelector->IsValid( this, aCellId ) ) @@ -826,7 +826,7 @@ SALOME_Actor SVTK_IndexedMapOfIds anIndexes; if(aMapIter != aVectorIdsMap.end()){ const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second; - vtkIdType anEnd = aVectorIds.size(); + vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int for(vtkIdType anId = 0; anId < anEnd; anId++ ) { int aCellId = aVectorIds[anId]; if ( !mySelector->IsValid( this, aCellId ) ) diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index a0c576e21..a9b1d1679 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -97,7 +97,7 @@ SVTK_DeviceActor myFeatureEdges->Delete(); - for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++) + for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++) myPassFilter[i]->Delete(); } @@ -205,7 +205,7 @@ SVTK_DeviceActor if(myIsFeatureEdgesEnabled) mTime = std::max(mTime,myFeatureEdges->GetMTime()); - for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++) + for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++) std::max(mTime,myPassFilter[i]->GetMTime()); return mTime; diff --git a/src/SVTK/SVTK_Hash.h b/src/SVTK/SVTK_Hash.h index 7f5b1d1fa..992756033 100644 --- a/src/SVTK/SVTK_Hash.h +++ b/src/SVTK/SVTK_Hash.h @@ -38,7 +38,7 @@ class SVTK_Hasher { public: static Standard_Integer HashCode(const std::vector ids, const Standard_Integer upper) { - Standard_Integer seed = ids.size(); + Standard_Integer seed = (int)ids.size(); //!< TODO: conversion from size_t to int for( Standard_Integer i = 0; i < (Standard_Integer) ids.size(); i++ ) { Standard_Integer v = ids[i]; seed ^= v + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ); diff --git a/src/SVTK/SVTK_ImageWriterMgr.cxx b/src/SVTK/SVTK_ImageWriterMgr.cxx index 9c255d52d..21058129d 100644 --- a/src/SVTK/SVTK_ImageWriterMgr.cxx +++ b/src/SVTK/SVTK_ImageWriterMgr.cxx @@ -88,7 +88,7 @@ SVTK_ImageWriterMgr //"- total = "<total()<< "; available = "<available()<InsertNextCell(VTK_POLYGON,aNbPoints,&aConnectivities[0]); if(theStoreMapping) VTKViewer_GeometryFilter::InsertId( theCellId, VTK_POLYGON, theVTK2ObjIds, theDimension2VTK2ObjIds ); diff --git a/src/VTKViewer/VTKViewer_OpenGLHelper.cxx b/src/VTKViewer/VTKViewer_OpenGLHelper.cxx index b40aeb7ba..696daedae 100644 --- a/src/VTKViewer/VTKViewer_OpenGLHelper.cxx +++ b/src/VTKViewer/VTKViewer_OpenGLHelper.cxx @@ -238,7 +238,7 @@ namespace GUI_OPENGL if( count > 0 ) { content = ( char* )malloc( sizeof( char ) * ( count + 1 ) ); - count = fread( content, sizeof( char ), count, file ); + count = (int)fread( content, sizeof( char ), count, file ); //!< TODO: conversion from size_t to int content[ count ] = '\0'; } fclose( file ); diff --git a/src/ViewerTools/ViewerTools_FontWidgetBase.cxx b/src/ViewerTools/ViewerTools_FontWidgetBase.cxx index 598171467..f3559b415 100644 --- a/src/ViewerTools/ViewerTools_FontWidgetBase.cxx +++ b/src/ViewerTools/ViewerTools_FontWidgetBase.cxx @@ -107,6 +107,7 @@ void ViewerTools_FontWidgetBase::SetData( const QColor& theColor, const bool theItalic, const bool theShadow ) { + //GUI_UNUSED(theFamily); SetColor( theColor ); myBold->setChecked( theBold ); @@ -120,6 +121,7 @@ void ViewerTools_FontWidgetBase::GetData( QColor& theColor, bool& theItalic, bool& theShadow ) const { + //GUI_UNUSED(theFamily); theColor = GetColor(); theBold = myBold->isChecked(); -- 2.39.2