browsermt / marian-dev

Fast Neural Machine Translation in C++ - development repository
https://marian-nmt.github.io
Other
20 stars 7 forks source link

Remove unused variable #83

Closed jelmervdl closed 2 years ago

jelmervdl commented 2 years ago

Description

Remove unused variable that the version of clang 13.1.6 (clang-1316.0.21.2) that XCode 13.3 ships with picks up on. Our compiler flags don't allow this.

marian-dev/src/training/communicator.h:105:11: error: variable 'pos' set but not used [-Werror,-Wunused-but-set-variable]
      int pos = 0;
          ^

How to test

I have not test training after this change.

I assume it is safe since the variable is a simple scalar, is only ever written to, and those writing statements all involve only scalars. So I don't expect any side effects suddenly being different.

Checklist