summaryrefslogtreecommitdiffstats
path: root/utils/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-09-27 15:58:59 +0800
committerPeng Wu <alexepico@gmail.com>2010-09-27 15:58:59 +0800
commit0091f1c5cc535e0a4cf5bdd564d62544be847962 (patch)
tree6e757f369856c49da149b7040b7b9f86cda1c872 /utils/storage
parente3b77ed49636d108f725423855797c4324f32a43 (diff)
downloadlibpinyin-0091f1c5cc535e0a4cf5bdd564d62544be847962.tar.gz
libpinyin-0091f1c5cc535e0a4cf5bdd564d62544be847962.tar.xz
libpinyin-0091f1c5cc535e0a4cf5bdd564d62544be847962.zip
fixes compile warnings.
Diffstat (limited to 'utils/storage')
-rw-r--r--utils/storage/export_interpolation.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/storage/export_interpolation.cpp b/utils/storage/export_interpolation.cpp
index 64aa920..af77586 100644
--- a/utils/storage/export_interpolation.cpp
+++ b/utils/storage/export_interpolation.cpp
@@ -91,7 +91,7 @@ void gen_unigram(FILE * output, FacadePhraseIndex * phrase_index) {
size_t freq = item.get_unigram_frequency();
char * phrase = token_to_string(phrase_index, j);
if ( phrase )
- fprintf(output, "\\item %s count %d\n", phrase, freq);
+ fprintf(output, "\\item %s count %lu\n", phrase, freq);
g_free(phrase);
}
@@ -110,9 +110,8 @@ void gen_bigram(FILE * output, FacadePhraseIndex * phrase_index, Bigram * bigram
g_array_free(user_items, TRUE);
PhraseItem item;
- utf16_t buffer[MAX_PHRASE_LENGTH];
- for(int i = 0; i < system_items->len; i++){
+ for(size_t i = 0; i < system_items->len; i++){
phrase_token_t token = g_array_index(system_items, phrase_token_t, i);
SingleGram * system = NULL, * user = NULL;
bigram->load(token, system, user);
@@ -120,7 +119,7 @@ void gen_bigram(FILE * output, FacadePhraseIndex * phrase_index, Bigram * bigram
BigramPhraseWithCountArray array = g_array_new(FALSE, FALSE, sizeof(BigramPhraseItemWithCount));
system->retrieve_all(array);
- for(int j = 0; j < array->len; j++) {
+ for(size_t j = 0; j < array->len; j++) {
BigramPhraseItemWithCount * item = &g_array_index(array, BigramPhraseItemWithCount, j);
char * word1 = token_to_string(phrase_index, token);