Menu

#15 Faiure to build with clang-5

v1.3.7
open
nobody
None
5
2018-05-22
2018-05-22
Yuri
No

I'm getting these failures on FreeBSD 11.1:

osra_openbabel.cpp:560:278: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]
  ...mol.NumAtoms(),mol.NumHvyAtoms(),mol.NumBonds()};
     ^~~~~~~~~~~~~~
osra_openbabel.cpp:560:278: note: insert an explicit cast to silence this issue
  ...mol.NumAtoms(),mol.NumHvyAtoms(),mol.NumBonds()};
     ^~~~~~~~~~~~~~
     static_cast<int>( )
osra_openbabel.cpp:560:293: mcdlutil.cpp:3600:11: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
      cH2=getBond(bN)->at[2];error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]

          ^               ~
  ...mol.NumHvyAtoms(),mol.NumBonds()};
     ^~~~~~~~~~~~~~~~~
mcdlutil.cpp:435osra_openbabel.cpp:560:293: note: insert an explicit cast to silence this issue
:3: note  ...mol.NumHvyAtoms(),mol.NumBonds()};
     ^~~~~~~~~~~~~~~~~
     static_cast<int>()
osra_openbabel.cpp:560:311: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]
: array  ...mol.NumBonds()};
     ^~~~~~~~~~~~~~
 'at'osra_openbabel.cpp:560:311: note: insert an explicit cast to silence this issue
 declared here
  ...mol.NumBonds()};  short int at[2];     /*Bond definition-atoms number in array ATOM*/
  ^

     ^~~~~~~~~~~~~~
     static_cast<int>( )
mcdlutil.cpp:5780:11: warning: add explicit braces to avoid dangling else [-Wdangling-else]
          else (*bondLabel)[j]=0;
          ^

Discussion


Log in to post a comment.