3MFConsortium / lib3mf

lib3mf is an implementation of the 3D Manufacturing Format file standard
http://3mf.io
BSD 2-Clause "Simplified" License
228 stars 92 forks source link

Fix warnings #315

Open dov opened 1 year ago

dov commented 1 year ago

Compiling under g++ produces lots of warnings.

Examples of warnings:

/space3/pub-repos/lib3mf/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp:196:44: warning: unused variable ‘pFace’ [-Wunused-variable]
  196 |                                 MESHFACE * pFace = pMesh->addFace(pNodes[0], pNodes[1], pNodes[2]);
      |                                            ^~~~~

/space3/pub-repos/lib3mf/Include/Model/Classes/NMR_KeyStoreCEKParams.h:45:43: warning:   ‘NMR::eKeyStoreEncryptAlgorithm NMR::CKeyStoreCEKParams::m_eAlgorithm’ [-Wreorder]
   45 |                 eKeyStoreEncryptAlgorithm m_eAlgorithm;
      |                                           ^~~~~~~~~~~~

/space3/pub-repos/lib3mf/Tests/CPP_Bindings/Source/BeamLattice.cpp:533:24: warning: catching polymorphic type ‘class Lib3MF::ELib3MFException’ by value [-Wcatch-value=]
  533 |                 catch (ELib3MFException) {
      |                        ^~~~~~~~~~~~~~~~
/space3/pub-repos/lib3mf/Tests/CPP_Bindings/Source/SliceStack.cpp:309:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘Lib3MF_uint64’ {aka ‘long unsigned int’} [-Wsign-compare]
  309 |                 for (int i = 0; i < A->GetSliceRefCount(); i++) {
      |                                 ~~^~~~~~~~~~~~~~~~~~~~~~~

Will you accept pull requests to fix these?

vijaiaeroastro commented 1 week ago

@dov We would be pleased to welcome any improvements.