libpinyin-2.9.92-1.fc42
List of Findings
Error: CPPCHECK_WARNING (CWE-401): [#def1]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/include/memory_chunk.h:399: error[memleakOnRealloc]: Common realloc mistake: 'm_data_begin' nulled but not freed upon failure
Error: COMPILER_WARNING (CWE-1164): [#def2]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/lookup/phonetic_lookup.cpp:21: included_from: Included from here.
libpinyin-2.9.92-build/libpinyin-2.9.92/src/lookup/phonetic_lookup.h:174:13: warning[-Wunused-function]: 'gint pinyin::trellis_value_compare(const trellis_value_t**, const trellis_value_t**)' defined but not used
Error: COMPILER_WARNING (CWE-1164): [#def3]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/lookup/phonetic_lookup.cpp:21: included_from: Included from here.
libpinyin-2.9.92-build/libpinyin-2.9.92/src/lookup/phonetic_lookup.h:174:13: warning[-Wunused-function]: ‘gint pinyin::trellis_value_compare(const trellis_value_t**, const trellis_value_t**)’ defined but not used
Error: COMPILER_WARNING (CWE-563): [#def4]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool _add_phrase(pinyin_context_t*, guint8, ChewingKeyVector, ucs4_t*, glong, gint)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:541:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def5]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'void _compute_prefixes(pinyin_instance_t*, const char*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1415:17: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def6]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1883:9: warning[-Wunused-variable]: unused variable 'result'
Error: COMPILER_WARNING (CWE-563): [#def7]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1885:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-195): [#def8]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool _prepend_longer_candidates(pinyin_instance_t*, CandidateVector)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1890:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'guint' {aka 'unsigned int'}
Error: COMPILER_WARNING (CWE-1023): [#def9]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool _compute_phrase_length(pinyin_context_t*, CandidateVector)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1965:15: warning[-Wswitch]: enumeration value 'LONGER_CANDIDATE' not handled in switch
Error: COMPILER_WARNING (CWE-1023): [#def10]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:1965:15: warning[-Wswitch]: enumeration value 'PREDICTED_PUNCTUATION_CANDIDATE' not handled in switch
Error: COMPILER_WARNING (CWE-563): [#def11]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool _compute_predicted_prefix_candidates(pinyin_instance_t*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2373:17: warning[-Wunused-variable]: unused variable 'prefixes'
Error: COMPILER_WARNING (CWE-563): [#def12]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2381:9: warning[-Wunused-variable]: unused variable 'result'
Error: COMPILER_WARNING (CWE-563): [#def13]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2383:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def14]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool pinyin_guess_predicted_candidates(pinyin_instance_t*, const char*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2413:25: warning[-Wunused-variable]: unused variable 'phrase_index'
Error: COMPILER_WARNING (CWE-563): [#def15]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2460:25: warning[-Wunused-variable]: unused variable 'phrase_index'
Error: COMPILER_WARNING (CWE-195): [#def16]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool pinyin_guess_predicted_candidates_with_punctuations(pinyin_instance_t*, const char*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2468:32: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'}
Error: COMPILER_WARNING (CWE-563): [#def17]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'int pinyin_choose_candidate(pinyin_instance_t*, size_t, lookup_candidate_t*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2578:10: warning[-Wunused-but-set-variable]: variable 'retval' set but not used
Error: COMPILER_WARNING (CWE-563): [#def18]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool pinyin_lookup_tokens(pinyin_instance_t*, const char*, GArray*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:2663:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def19]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp: scope_hint: In function 'bool _pre_compute_tokens(pinyin_context_t*, TokenVector, ucs4_t*, size_t)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/pinyin.cpp:3114:13: warning[-Wunused-variable]: unused variable 'retval'
Error: COMPILER_WARNING (CWE-563): [#def20]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/ngram_kyotodb.cpp:26: included_from: Included from here.
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/kyotodb_utils.h:50:21: warning[-Wunused-variable]: 'pinyin::empty_vbuf' defined but not used
Error: COMPILER_WARNING (CWE-563): [#def21]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/ngram_kyotodb.cpp:26: included_from: Included from here.
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/kyotodb_utils.h:50:21: warning[-Wunused-variable]: ‘pinyin::empty_vbuf’ defined but not used
Error: CPPCHECK_WARNING (CWE-476): [#def22]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/pinyin_parser2.cpp:359: warning[nullPointer]: Possible null pointer dereference: curstep
Error: CPPCHECK_WARNING (CWE-476): [#def23]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/pinyin_parser2.cpp:360: warning[nullPointer]: Possible null pointer dereference: curstep
Error: CPPCHECK_WARNING (CWE-476): [#def24]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/storage/pinyin_parser2.cpp:365: warning[nullPointer]: Possible null pointer dereference: curstep
Error: COMPILER_WARNING (CWE-563): [#def25]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp: scope_hint: In function 'bool _add_phrase(zhuyin_context_t*, guint8, ChewingKeyVector, ucs4_t*, glong, gint)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:427:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def26]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp: scope_hint: In function 'void _compute_prefixes(zhuyin_instance_t*, const char*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:933:17: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def27]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1638:26: warning[-Wunused-variable]: unused variable 'context'
Error: COMPILER_WARNING (CWE-563): [#def28]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1641:25: warning[-Wunused-variable]: unused variable 'results'
Error: COMPILER_WARNING (CWE-563): [#def29]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1647:10: warning[-Wunused-but-set-variable]: variable 'retval' set but not used
Error: COMPILER_WARNING (CWE-563): [#def30]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp: scope_hint: In function 'int zhuyin_choose_candidate(zhuyin_instance_t*, size_t, lookup_candidate_t*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1651:16: warning[-Wunused-variable]: unused variable 'len'
Error: COMPILER_WARNING (CWE-563): [#def31]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1658:16: warning[-Wunused-variable]: unused variable 'len'
Error: COMPILER_WARNING (CWE-563): [#def32]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp: scope_hint: In function 'bool zhuyin_lookup_tokens(zhuyin_instance_t*, const char*, GArray*)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:1690:9: warning[-Wunused-variable]: unused variable 'num'
Error: COMPILER_WARNING (CWE-563): [#def33]
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp: scope_hint: In function 'bool _pre_compute_tokens(zhuyin_context_t*, TokenVector, ucs4_t*, size_t)'
libpinyin-2.9.92-build/libpinyin-2.9.92/src/zhuyin.cpp:2078:13: warning[-Wunused-variable]: unused variable 'retval'
Error: COMPILER_WARNING (CWE-195): [#def34]
libpinyin-2.9.92-build/libpinyin-2.9.92/tests/storage/test_phrase_table.cpp: scope_hint: In function ‘int main(int, char**)’
libpinyin-2.9.92-build/libpinyin-2.9.92/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): [#def35]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/segment/mergeseq.cpp: scope_hint: In function ‘bool merge_sequence(pinyin::FacadePhraseTable3*, pinyin::FacadePhraseIndex*, UnicodeCharVector, TokenInfoVector)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/segment/mergeseq.cpp:99:17: warning[-Wunused-variable]: unused variable ‘num’
Error: COMPILER_WARNING (CWE-563): [#def36]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/segment/spseg.cpp: scope_hint: In function ‘bool segment(pinyin::FacadePhraseTable3*, pinyin::FacadePhraseIndex*, GArray*, GArray*)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/segment/spseg.cpp:114:17: warning[-Wunused-variable]: unused variable ‘num’
Error: COMPILER_WARNING (CWE-563): [#def37]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/storage/gen_zhuyin_table.cpp: scope_hint: In function ‘void gen_phrase_file(const char*, int)’
libpinyin-2.9.92-build/libpinyin-2.9.92/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): [#def38]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/estimate_interpolation.cpp: scope_hint: In function ‘parameter_t compute_interpolation(pinyin::SingleGram*, pinyin::FacadePhraseIndex*, pinyin::SingleGram*)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/estimate_interpolation.cpp:33:10: warning[-Wunused-variable]: unused variable ‘success’
Error: COMPILER_WARNING (CWE-563): [#def39]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/estimate_k_mixture_model.cpp: scope_hint: In function ‘parameter_t compute_interpolation(pinyin::KMixtureModelSingleGram*, pinyin::KMixtureModelBigram*, pinyin::KMixtureModelSingleGram*)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/estimate_k_mixture_model.cpp:39:10: warning[-Wunused-variable]: unused variable ‘success’
Error: COMPILER_WARNING (CWE-195): [#def40]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/gen_k_mixture_model.cpp: scope_hint: In function ‘void train_word_pair(HashofUnigram, pinyin::KMixtureModelSingleGram*, phrase_token_t, guint32)’
libpinyin-2.9.92-build/libpinyin-2.9.92/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): [#def41]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/gen_k_mixture_model.cpp: scope_hint: In function ‘bool post_processing_unigram(pinyin::KMixtureModelBigram*, HashofUnigram)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/gen_k_mixture_model.cpp:302:14: warning[-Wunused-variable]: unused variable ‘result’
Error: COMPILER_WARNING (CWE-563): [#def42]
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/prune_k_mixture_model.cpp: scope_hint: In function ‘bool prune_k_mixture_model(pinyin::KMixtureModelMagicHeader*, pinyin::KMixtureModelSingleGram*&, pinyin::FlexibleBigramPhraseArray)’
libpinyin-2.9.92-build/libpinyin-2.9.92/utils/training/prune_k_mixture_model.cpp:48:10: warning[-Wunused-variable]: unused variable ‘success’
Scan Properties
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-243.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libpinyin-2.9.92-1.fc42 |
store-results-to | /tmp/tmp3q9j5c6d/libpinyin-2.9.92-1.fc42.tar.xz |
time-created | 2024-11-13 01:42:52 |
time-finished | 2024-11-13 01:46:18 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp3q9j5c6d/libpinyin-2.9.92-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp3q9j5c6d/libpinyin-2.9.92-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |