mirror of
https://github.com/fanlumaster/googlepinyinime-rev.git
synced 2025-07-18 00:47:57 +08:00
fix some small warnings
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
|
@ -1059,14 +1059,14 @@ void MatrixSearch::prepare_candidates() {
|
||||
if (kPrintDebug0) {
|
||||
printf("-----Prepare candidates, score:\n");
|
||||
for (size_t a = 0; a < lpi_total_; a++) {
|
||||
printf("[%03d]%d ", a, lpi_items_[a].psb);
|
||||
printf("[%03zu]%d ", a, lpi_items_[a].psb);
|
||||
if ((a + 1) % 6 == 0) printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
if (kPrintDebug0) {
|
||||
printf("--- lpi_total_ = %d\n", lpi_total_);
|
||||
printf("--- lpi_total_ = %zu\n", lpi_total_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1331,7 +1331,7 @@ size_t MatrixSearch::extend_dmi(DictExtPara *dep, DictMatchInfo *dmi_s) {
|
||||
if (0 == lpi_total_) return ret_val;
|
||||
|
||||
if (kPrintDebug0) {
|
||||
printf("--- lpi_total_ = %d\n", lpi_total_);
|
||||
printf("--- lpi_total_ = %zu\n", lpi_total_);
|
||||
}
|
||||
|
||||
myqsort(lpi_items_, lpi_total_, sizeof(LmaPsbItem), cmp_lpi_with_psb);
|
||||
@ -1457,7 +1457,7 @@ char16 *MatrixSearch::get_candidate0(char16 *cand_str, size_t max_len, uint16 *r
|
||||
id_num++;
|
||||
|
||||
if (kPrintDebug1) {
|
||||
printf("---MatrixNode [step: %d, lma_idx: %d, total score:%.5f]\n", mtrx_nd->step, mtrx_nd->id, mtrx_nd->score);
|
||||
printf("---MatrixNode [step: %d, lma_idx: %zu, total score:%.5f]\n", mtrx_nd->step, mtrx_nd->id, mtrx_nd->score);
|
||||
debug_print_dmi(mtrx_nd->dmi_fr, 1);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "../include/pinyinime.h"
|
||||
#include "../include/dicttrie.h"
|
||||
#include "../include/matrixsearch.h"
|
||||
#include "../include/spellingtrie.h"
|
||||
|
||||
|
@ -73,5 +73,9 @@ int main() {
|
||||
test_pinyin_search_and_segment("qunimadegouridequsibawonengzenmeban");
|
||||
test_pinyin_search_and_segment("kanbuchulaishizenmexianzhichangdude");
|
||||
test_pinyin_search_and_segment("ninininininininininininininininini");
|
||||
test_pinyin_search_and_segment("jingjiandao");
|
||||
test_pinyin_search_and_segment("zhen'ta'ma'an'jing");
|
||||
test_pinyin_search_and_segment("zh'ta'ma'an'jing");
|
||||
test_pinyin_search_and_segment("ni'shuo'ni'ma'ne");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user