mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 12:52:29 +03:00
464615a0c3
Compiling with clang++ at the default warning/error levels produces some interesting warnings. Here's a pair of fixes for the simplest instances: moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.cpp:133:7: warning: comparison of array 'path' equal to a null pointer is always false [-Wtautological-pointer-compare] if (path == NULL) { ^~~~ ~~~~ (The code unnecessarily checks that an automatic variable has a non-null address). moses/TranslationModel/DynSAInclude/onlineRLM.h:305:20: warning: unsequenced modification and access to 'den_val' [-Wunsequenced] if(((den_val = query(&ngram[len - num_fnd], num_fnd - 1)) > 0) && ^ (The code tries to cram too much into an "if" condition.) |
||
---|---|---|
.. | ||
Loader.h | ||
LoaderCompact.cpp | ||
LoaderCompact.h | ||
LoaderFactory.cpp | ||
LoaderFactory.h | ||
LoaderHiero.cpp | ||
LoaderHiero.h | ||
LoaderStandard.cpp | ||
LoaderStandard.h | ||
PhraseDictionaryALSuffixArray.cpp | ||
PhraseDictionaryALSuffixArray.h | ||
PhraseDictionaryFuzzyMatch.cpp | ||
PhraseDictionaryFuzzyMatch.h | ||
PhraseDictionaryOnDisk.cpp | ||
PhraseDictionaryOnDisk.h | ||
Trie.cpp | ||
Trie.h | ||
UTrie.cpp | ||
UTrie.h | ||
UTrieNode.cpp | ||
UTrieNode.h |