hsnr-gamera / gamera-4

Gamera 4 for Python 3
GNU General Public License v2.0
10 stars 8 forks source link

Fix basic compiler warnings #57

Closed FriedrichFroebel closed 2 years ago

FriedrichFroebel commented 2 years ago

This fixes some basic compiler warnings which just pollute the build log. Fixes #42.

binarization.hpp

include/plugins/binarization.hpp: In function ‘Gamera::Image* brink_threshold(const T&)’:
include/plugins/binarization.hpp:1024:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
 1024 |   for (i = 1; i < 256; ++i)         // get cumulative sum
      |   ^~~
include/plugins/binarization.hpp:1027:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
 1027 |     for (i = 0; i < 256; ++i)       // set to diagonal
      |     ^~~

eoState.cpp

src/eodev/utils/eoState.cpp: In member function ‘void eoState::load(std::istream&)’:
src/eodev/utils/eoState.cpp:131:19: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  131 |                   if (is_section(str, name))
      |                   ^~
src/eodev/utils/eoState.cpp:134:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  134 |                     removeComment(str, getCommentString());
      |                     ^~~~~~~~~~~~~

functortraits.hxx

Backport of https://github.com/ukoethe/vigra/commit/7a20c9b593d8137b8c1ac142882938c020e09a63.

static_assert.hxx

Backport of https://github.com/ukoethe/vigra/commit/aaaf44d240aebd0eb3539b6e105a19a984000d81.