libpinyin-2.10.3-1.fc44
List of Findings
Error: CPPCHECK_WARNING (CWE-401): [#def1]
libpinyin-2.10.3/src/include/memory_chunk.h:399: error[memleakOnRealloc]: Common realloc mistake: 'm_data_begin' nulled but not freed upon failure
Error: COMPILER_WARNING (CWE-563): [#def2]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'bool _add_phrase(pinyin_context_t*, guint8, ChewingKeyVector, ucs4_t*, glong, gint)'
libpinyin-2.10.3/src/pinyin.cpp:541:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def3]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'void _compute_prefixes(pinyin_instance_t*, const char*)'
libpinyin-2.10.3/src/pinyin.cpp:1415:17: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def4]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'bool _prepend_longer_candidates(pinyin_instance_t*, CandidateVector)'
libpinyin-2.10.3/src/pinyin.cpp:1883:9: warning[-Wunused-variable]: unused variable 'result'
Error: COMPILER_WARNING (CWE-563): [#def5]
libpinyin-2.10.3/src/pinyin.cpp:1885:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def6]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'bool _compute_predicted_prefix_candidates(pinyin_instance_t*)'
libpinyin-2.10.3/src/pinyin.cpp:2382:9: warning[-Wunused-variable]: unused variable 'result'
Error: COMPILER_WARNING (CWE-563): [#def7]
libpinyin-2.10.3/src/pinyin.cpp:2384:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def8]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'int pinyin_choose_candidate(pinyin_instance_t*, size_t, lookup_candidate_t*)'
libpinyin-2.10.3/src/pinyin.cpp:2577:10: warning[-Wunused-but-set-variable]: variable 'retval' set but not used
Error: COMPILER_WARNING (CWE-563): [#def9]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'bool pinyin_lookup_tokens(pinyin_instance_t*, const char*, GArray*)'
libpinyin-2.10.3/src/pinyin.cpp:2662:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def10]
libpinyin-2.10.3/src/pinyin.cpp: scope_hint: In function 'bool _pre_compute_tokens(pinyin_context_t*, TokenVector, ucs4_t*, size_t)'
libpinyin-2.10.3/src/pinyin.cpp:3113:13: warning[-Wunused-variable]: unused variable 'retval'
Error: COMPILER_WARNING (CWE-563): [#def11]
libpinyin-2.10.3/src/storage/ngram_kyotodb.cpp:26: included_from: Included from here.
libpinyin-2.10.3/src/storage/kyotodb_utils.h:50:21: warning[-Wunused-variable]: 'pinyin::empty_vbuf' defined but not used
Error: COMPILER_WARNING (CWE-563): [#def12]
libpinyin-2.10.3/src/storage/ngram_kyotodb.cpp:26: included_from: Included from here.
libpinyin-2.10.3/src/storage/kyotodb_utils.h:50:21: warning[-Wunused-variable]: ‘pinyin::empty_vbuf’ defined but not used
Error: CPPCHECK_WARNING (CWE-476): [#def13]
libpinyin-2.10.3/src/storage/pinyin_parser2.cpp:359: warning[nullPointer]: Possible null pointer dereference: curstep
Error: CPPCHECK_WARNING (CWE-476): [#def14]
libpinyin-2.10.3/src/storage/pinyin_parser2.cpp:360: warning[nullPointer]: Possible null pointer dereference: curstep
Error: CPPCHECK_WARNING (CWE-476): [#def15]
libpinyin-2.10.3/src/storage/pinyin_parser2.cpp:365: warning[nullPointer]: Possible null pointer dereference: curstep
Error: COMPILER_WARNING (CWE-563): [#def16]
libpinyin-2.10.3/src/zhuyin.cpp: scope_hint: In function 'bool _add_phrase(zhuyin_context_t*, guint8, ChewingKeyVector, ucs4_t*, glong, gint)'
libpinyin-2.10.3/src/zhuyin.cpp:427:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def17]
libpinyin-2.10.3/src/zhuyin.cpp: scope_hint: In function 'void _compute_prefixes(zhuyin_instance_t*, const char*)'
libpinyin-2.10.3/src/zhuyin.cpp:933:17: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def18]
libpinyin-2.10.3/src/zhuyin.cpp:1638:26: warning[-Wunused-variable]: unused variable 'context'
Error: COMPILER_WARNING (CWE-563): [#def19]
libpinyin-2.10.3/src/zhuyin.cpp:1641:25: warning[-Wunused-variable]: unused variable 'results'
Error: COMPILER_WARNING (CWE-563): [#def20]
libpinyin-2.10.3/src/zhuyin.cpp:1647:10: warning[-Wunused-but-set-variable]: variable 'retval' set but not used
Error: COMPILER_WARNING (CWE-563): [#def21]
libpinyin-2.10.3/src/zhuyin.cpp: scope_hint: In function 'int zhuyin_choose_candidate(zhuyin_instance_t*, size_t, lookup_candidate_t*)'
libpinyin-2.10.3/src/zhuyin.cpp:1651:16: warning[-Wunused-variable]: unused variable 'len'
Error: COMPILER_WARNING (CWE-563): [#def22]
libpinyin-2.10.3/src/zhuyin.cpp:1658:16: warning[-Wunused-variable]: unused variable 'len'
Error: COMPILER_WARNING (CWE-563): [#def23]
libpinyin-2.10.3/src/zhuyin.cpp: scope_hint: In function 'bool zhuyin_lookup_tokens(zhuyin_instance_t*, const char*, GArray*)'
libpinyin-2.10.3/src/zhuyin.cpp:1690:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def24]
libpinyin-2.10.3/src/zhuyin.cpp: scope_hint: In function 'bool _pre_compute_tokens(zhuyin_context_t*, TokenVector, ucs4_t*, size_t)'
libpinyin-2.10.3/src/zhuyin.cpp:2078:13: warning[-Wunused-variable]: unused variable 'retval'
Error: COMPILER_WARNING (CWE-195): [#def25]
libpinyin-2.10.3/tests/storage/test_phrase_table.cpp: scope_hint: In function ‘int main(int, char**)’
libpinyin-2.10.3/tests/storage/test_phrase_table.cpp:67:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘glong’ {aka ‘long int’}
Error: COMPILER_WARNING (CWE-563): [#def26]
libpinyin-2.10.3/utils/segment/mergeseq.cpp: scope_hint: In function ‘bool merge_sequence(pinyin::FacadePhraseTable3*, pinyin::FacadePhraseIndex*, UnicodeCharVector, TokenInfoVector)’
libpinyin-2.10.3/utils/segment/mergeseq.cpp:99:17: warning[-Wunused-variable]: unused variable ‘num’
Error: COMPILER_WARNING (CWE-563): [#def27]
libpinyin-2.10.3/utils/segment/spseg.cpp: scope_hint: In function ‘bool segment(pinyin::FacadePhraseTable3*, pinyin::FacadePhraseIndex*, GArray*, GArray*)’
libpinyin-2.10.3/utils/segment/spseg.cpp:114:17: warning[-Wunused-variable]: unused variable ‘num’
Error: COMPILER_WARNING (CWE-563): [#def28]
libpinyin-2.10.3/utils/storage/gen_zhuyin_table.cpp: scope_hint: In function ‘void gen_phrase_file(const char*, int)’
libpinyin-2.10.3/utils/storage/gen_zhuyin_table.cpp:311:36: warning[-Wunused-but-set-variable]: variable ‘key_rest’ set but not used
Error: COMPILER_WARNING (CWE-563): [#def29]
libpinyin-2.10.3/utils/training/estimate_interpolation.cpp: scope_hint: In function ‘parameter_t compute_interpolation(pinyin::SingleGram*, pinyin::FacadePhraseIndex*, pinyin::SingleGram*)’
libpinyin-2.10.3/utils/training/estimate_interpolation.cpp:33:10: warning[-Wunused-variable]: unused variable ‘success’
Error: COMPILER_WARNING (CWE-563): [#def30]
libpinyin-2.10.3/utils/training/estimate_k_mixture_model.cpp: scope_hint: In function ‘parameter_t compute_interpolation(pinyin::KMixtureModelSingleGram*, pinyin::KMixtureModelBigram*, pinyin::KMixtureModelSingleGram*)’
libpinyin-2.10.3/utils/training/estimate_k_mixture_model.cpp:39:10: warning[-Wunused-variable]: unused variable ‘success’
Error: COMPILER_WARNING (CWE-195): [#def31]
libpinyin-2.10.3/utils/training/gen_k_mixture_model.cpp: scope_hint: In function ‘void train_word_pair(HashofUnigram, pinyin::KMixtureModelSingleGram*, phrase_token_t, guint32)’
libpinyin-2.10.3/utils/training/gen_k_mixture_model.cpp:184:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘guint32’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’}
Error: COMPILER_WARNING (CWE-563): [#def32]
libpinyin-2.10.3/utils/training/gen_k_mixture_model.cpp: scope_hint: In function ‘bool post_processing_unigram(pinyin::KMixtureModelBigram*, HashofUnigram)’
libpinyin-2.10.3/utils/training/gen_k_mixture_model.cpp:302:14: warning[-Wunused-variable]: unused variable ‘result’
Error: COMPILER_WARNING (CWE-563): [#def33]
libpinyin-2.10.3/utils/training/prune_k_mixture_model.cpp: scope_hint: In function ‘bool prune_k_mixture_model(pinyin::KMixtureModelMagicHeader*, pinyin::KMixtureModelSingleGram*&, pinyin::FlexibleBigramPhraseArray)’
libpinyin-2.10.3/utils/training/prune_k_mixture_model.cpp:48:10: warning[-Wunused-variable]: unused variable ‘success’
Scan Properties
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-32.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | libpinyin-2.10.3-1.fc44 |
| store-results-to | /tmp/tmphwn8l0wd/libpinyin-2.10.3-1.fc44.tar.xz |
| time-created | 2025-10-28 19:10:27 |
| time-finished | 2025-10-28 19:13:46 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmphwn8l0wd/libpinyin-2.10.3-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmphwn8l0wd/libpinyin-2.10.3-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |