Use %zd to print size_t value.

Change-Id: Id46f50353b489d84b9a97dd4ddc5519bd99492cd
main
Keisuke Kuroyanagi 2014-08-15 14:41:28 +09:00
parent ed1ab3b363
commit 7be252d479
2 changed files with 6 additions and 6 deletions

View File

@ -210,7 +210,7 @@ bool Ver4PatriciaTriePolicy::addUnigramEntry(const int *const word, const int le
} }
for (const auto &shortcut : unigramProperty->getShortcuts()) { for (const auto &shortcut : unigramProperty->getShortcuts()) {
if (shortcut.getTargetCodePoints()->size() > MAX_WORD_LENGTH) { if (shortcut.getTargetCodePoints()->size() > MAX_WORD_LENGTH) {
AKLOGE("One of shortcut targets is too long to insert to the dictionary, length: %d", AKLOGE("One of shortcut targets is too long to insert to the dictionary, length: %zd",
shortcut.getTargetCodePoints()->size()); shortcut.getTargetCodePoints()->size());
return false; return false;
} }
@ -245,7 +245,7 @@ bool Ver4PatriciaTriePolicy::addUnigramEntry(const int *const word, const int le
if (!mUpdatingHelper.addShortcutTarget(wordPos, if (!mUpdatingHelper.addShortcutTarget(wordPos,
shortcut.getTargetCodePoints()->data(), shortcut.getTargetCodePoints()->data(),
shortcut.getTargetCodePoints()->size(), shortcut.getProbability())) { shortcut.getTargetCodePoints()->size(), shortcut.getProbability())) {
AKLOGE("Cannot add new shortcut target. PtNodePos: %d, length: %d, " AKLOGE("Cannot add new shortcut target. PtNodePos: %d, length: %zd, "
"probability: %d", wordPos, shortcut.getTargetCodePoints()->size(), "probability: %d", wordPos, shortcut.getTargetCodePoints()->size(),
shortcut.getProbability()); shortcut.getProbability());
return false; return false;
@ -289,7 +289,7 @@ bool Ver4PatriciaTriePolicy::addNgramEntry(const PrevWordsInfo *const prevWordsI
} }
if (bigramProperty->getTargetCodePoints()->size() > MAX_WORD_LENGTH) { if (bigramProperty->getTargetCodePoints()->size() > MAX_WORD_LENGTH) {
AKLOGE("The word is too long to insert the ngram to the dictionary. " AKLOGE("The word is too long to insert the ngram to the dictionary. "
"length: %d", bigramProperty->getTargetCodePoints()->size()); "length: %zd", bigramProperty->getTargetCodePoints()->size());
return false; return false;
} }
int prevWordsPtNodePos[MAX_PREV_WORD_COUNT_FOR_N_GRAM]; int prevWordsPtNodePos[MAX_PREV_WORD_COUNT_FOR_N_GRAM];

View File

@ -200,7 +200,7 @@ bool Ver4PatriciaTriePolicy::addUnigramEntry(const int *const word, const int le
} }
for (const auto &shortcut : unigramProperty->getShortcuts()) { for (const auto &shortcut : unigramProperty->getShortcuts()) {
if (shortcut.getTargetCodePoints()->size() > MAX_WORD_LENGTH) { if (shortcut.getTargetCodePoints()->size() > MAX_WORD_LENGTH) {
AKLOGE("One of shortcut targets is too long to insert to the dictionary, length: %d", AKLOGE("One of shortcut targets is too long to insert to the dictionary, length: %zd",
shortcut.getTargetCodePoints()->size()); shortcut.getTargetCodePoints()->size());
return false; return false;
} }
@ -235,7 +235,7 @@ bool Ver4PatriciaTriePolicy::addUnigramEntry(const int *const word, const int le
if (!mUpdatingHelper.addShortcutTarget(wordPos, if (!mUpdatingHelper.addShortcutTarget(wordPos,
shortcut.getTargetCodePoints()->data(), shortcut.getTargetCodePoints()->data(),
shortcut.getTargetCodePoints()->size(), shortcut.getProbability())) { shortcut.getTargetCodePoints()->size(), shortcut.getProbability())) {
AKLOGE("Cannot add new shortcut target. PtNodePos: %d, length: %d, " AKLOGE("Cannot add new shortcut target. PtNodePos: %d, length: %zd, "
"probability: %d", wordPos, shortcut.getTargetCodePoints()->size(), "probability: %d", wordPos, shortcut.getTargetCodePoints()->size(),
shortcut.getProbability()); shortcut.getProbability());
return false; return false;
@ -286,7 +286,7 @@ bool Ver4PatriciaTriePolicy::addNgramEntry(const PrevWordsInfo *const prevWordsI
} }
if (bigramProperty->getTargetCodePoints()->size() > MAX_WORD_LENGTH) { if (bigramProperty->getTargetCodePoints()->size() > MAX_WORD_LENGTH) {
AKLOGE("The word is too long to insert the ngram to the dictionary. " AKLOGE("The word is too long to insert the ngram to the dictionary. "
"length: %d", bigramProperty->getTargetCodePoints()->size()); "length: %zd", bigramProperty->getTargetCodePoints()->size());
return false; return false;
} }
int prevWordsPtNodePos[MAX_PREV_WORD_COUNT_FOR_N_GRAM]; int prevWordsPtNodePos[MAX_PREV_WORD_COUNT_FOR_N_GRAM];