flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.21k stars 646 forks source link

gcc emits build warnings for misleading indentation #491

Open alokpr opened 2 years ago

alokpr commented 2 years ago

Build fails with -Wall -Werror:

flann/util/any.h: In member function 'virtual void flann::anyimpl::big_any_policy<T>::static_delete(void**)':
flann/util/any.h:81:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   81 |         if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;
      |         ^~
flann/util/any.h:81:55: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   81 |         if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;
      |                                                       ^