Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
hunspell-1.7.2/src/hunspell/affentry.cxx: scope_hint: In member function 'PfxEntry::~PfxEntry()'
hunspell-1.7.2/src/hunspell/affentry.cxx:875:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/affentry.gcda' profile count data file not found
#  875 | }
#      | ^
#  873|     rappnd = appnd;
#  874|     reverseword(rappnd);
#  875|-> }
#  876|   
#  877|   #if 0

Error: COMPILER_WARNING (CWE-195): [#def2]
hunspell-1.7.2/src/hunspell/affixmgr.cxx: scope_hint: In member function 'int AffixMgr::cpdpat_check(const std::string&, int, hentry*, hentry*, char)'
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1340:51: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int'
# 1340 |            ((len = i.pattern.size()) != 0) && len <= pos &&
#      |                                               ~~~~^~~~~~
# 1338|              strncmp(word.c_str() + pos - r1->blen, r1->word, r1->blen) == 0) ||
# 1339|             (i.pattern[0] != '0' &&
# 1340|->            ((len = i.pattern.size()) != 0) && len <= pos &&
# 1341|              strncmp(word.c_str() + pos - len, i.pattern.c_str(), len) == 0)))) {
# 1342|         return 1;

Error: COMPILER_WARNING (CWE-195): [#def3]
hunspell-1.7.2/src/hunspell/affixmgr.cxx: scope_hint: In member function 'hentry* AffixMgr::compound_check(const std::string&, short int, short int, short int, short int, hentry**, hentry**, char, char, int*)'
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1634:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1634 |                   i > word.size() ||
#      |                   ~~^~~~~~~~~~~~~
# 1632|             for (; scpd <= checkcpdtable.size() &&
# 1633|                    (checkcpdtable[scpd - 1].pattern3.empty() ||
# 1634|->                   i > word.size() ||
# 1635|                     word.compare(i, checkcpdtable[scpd - 1].pattern3.size(), checkcpdtable[scpd - 1].pattern3) != 0);
# 1636|                  scpd++)

Error: COMPILER_WARNING (CWE-195): [#def4]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1659:15: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1659 |         if (i > st.size())
#      |             ~~^~~~~~~~~~~
# 1657|           }
# 1658|   
# 1659|-> 	if (i > st.size())
# 1660|   	    return NULL;
# 1661|   

Error: COMPILER_WARNING (CWE-195): [#def5]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1829:63: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1829 |                (checkcompoundcase && scpd == 0 && !words && i < word.size() &&
#      |                                                             ~~^~~~~~~~~~~~~
# 1827|                    ((word[i - 1] == word[i + 1]))  // may be word[i+1] == '\0'
# 1828|                    )) ||
# 1829|->                (checkcompoundcase && scpd == 0 && !words && i < word.size() &&
# 1830|                   cpdcase_check(word, i))))
# 1831|               // LANG_hu section: spec. Hungarian rule

Error: COMPILER_WARNING (CWE-195): [#def6]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1864:37: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1864 |               } else if (i > 2 && i <= word.size() && word[i - 1] == word[i - 2])
#      |                                   ~~^~~~~~~~~~~~~~
# 1862|                   checkedstriple = 1;
# 1863|                   i--;  // check "fahrt" instead of "ahrt" in "Schiffahrt"
# 1864|->               } else if (i > 2 && i <= word.size() && word[i - 1] == word[i - 2])
# 1865|                   striple = 1;
# 1866|               }

Error: COMPILER_WARNING (CWE-195): [#def7]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1935:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1935 |                     (i < word.size() && !cpdpat_check(word, i, rv_first, rv, 0))) &&
#      |                      ~~^~~~~~~~~~~~~
# 1933|                       // test CHECKCOMPOUNDPATTERN
# 1934|                       checkcpdtable.empty() || scpd != 0 ||
# 1935|->                     (i < word.size() && !cpdpat_check(word, i, rv_first, rv, 0))) &&
# 1936|                   ((!checkcompounddup || (rv != rv_first)))
# 1937|                   // test CHECKCOMPOUNDPATTERN conditions

Error: COMPILER_WARNING (CWE-195): [#def8]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1955:53: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1955 |             rv = (compoundflag && !onlycpdrule && i < word.size())
#      |                                                   ~~^~~~~~~~~~~~~
# 1953|               sfx = NULL;
# 1954|               sfxflag = FLAG_NULL;
# 1955|->             rv = (compoundflag && !onlycpdrule && i < word.size())
# 1956|                        ? affix_check(word, i, word.size() - i, compoundflag,
# 1957|                                      IN_CPD_END)

Error: COMPILER_WARNING (CWE-195): [#def9]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1962:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1962 |               if (i < word.size())
#      |                   ~~^~~~~~~~~~~~~
# 1960|                 sfx = NULL;
# 1961|                 pfx = NULL;
# 1962|->               if (i < word.size())
# 1963|                   rv = affix_check(word, i, word.size() - i, compoundend, IN_CPD_END);
# 1964|               }

Error: COMPILER_WARNING (CWE-195): [#def10]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:1967:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 1967 |               if (i < word.size())
#      |                   ~~^~~~~~~~~~~~~
# 1965|   
# 1966|               if (!rv && !defcpdtable.empty() && words) {
# 1967|->               if (i < word.size())
# 1968|                   rv = affix_check(word, i, word.size() - i, 0, IN_CPD_END);
# 1969|                 if (rv && defcpd_check(&words, wnum + 1, rv, NULL, 1))

Error: COMPILER_WARNING (CWE-195): [#def11]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:2015:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 2015 |               if (i < word.size()) {
#      |                   ~~^~~~~~~~~~~~~
# 2013|   
# 2014|               if (langnum == LANG_hu) {
# 2015|->               if (i < word.size()) {
# 2016|                   // calculate syllable number of the word
# 2017|                   numsyllable += get_syllable(word.substr(i));

Error: COMPILER_WARNING (CWE-195): [#def12]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:2088:53: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 2088 |               if (rv && !checkcpdtable.empty() && i < word.size() &&
#      |                                                   ~~^~~~~~~~~~~~~
# 2086|                                     is_sug, info);
# 2087|   
# 2088|->               if (rv && !checkcpdtable.empty() && i < word.size() &&
# 2089|                     ((scpd == 0 &&
# 2090|                       cpdpat_check(word, i, rv_first, rv, affixed)) ||

Error: COMPILER_WARNING (CWE-195): [#def13]
hunspell-1.7.2/src/hunspell/affixmgr.cxx:2110:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
# 2110 |                 if (i < word.size() && word.compare(i, rv->blen, rv->word, rv->blen) == 0) {
#      |                     ~~^~~~~~~~~~~~~
# 2108|   
# 2109|                   // check first part
# 2110|->                 if (i < word.size() && word.compare(i, rv->blen, rv->word, rv->blen) == 0) {
# 2111|                     char r = st[i + rv->blen];
# 2112|                     st[i + rv->blen] = '\0';

Error: COMPILER_WARNING: [#def14]
hunspell-1.7.2/src/hunspell/affixmgr.cxx: scope_hint: In function 'std::__advance<w_char*, long>(w_char*&, long, std::random_access_iterator_tag)void'
hunspell-1.7.2/src/hunspell/affixmgr.cxx:4845:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/affixmgr.gcda' profile count data file not found
# 4845 | }
#      | ^
# 4843|     }
# 4844|     return slst;
# 4845|-> }

Error: COMPILER_WARNING: [#def15]
hunspell-1.7.2/src/hunspell/csutil.cxx: scope_hint: In function 'std::__advance<w_char*, long>(w_char*&, long, std::random_access_iterator_tag)void'
hunspell-1.7.2/src/hunspell/csutil.cxx:2665:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/csutil.gcda' profile count data file not found
# 2665 | }
#      | ^
# 2663|     }
# 2664|     return true;
# 2665|-> }

Error: COMPILER_WARNING: [#def16]
hunspell-1.7.2/src/hunspell/filemgr.cxx: scope_hint: In member function 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
hunspell-1.7.2/src/hunspell/filemgr.cxx:119:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/filemgr.gcda' profile count data file not found
#  119 | }
#      | ^
#  117|   int FileMgr::getlinenum() {
#  118|     return linenum;
#  119|-> }

Error: COMPILER_WARNING (CWE-195): [#def17]
hunspell-1.7.2/src/hunspell/hashmgr.cxx: scope_hint: In member function 'int HashMgr::hash(const char*, size_t) const'
hunspell-1.7.2/src/hunspell/hashmgr.cxx:693:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'}
#  693 |   while (i < 4 && i < len)
#      |                   ~~^~~~~
#  691|     unsigned long hv = 0;
#  692|     int i = 0;
#  693|->   while (i < 4 && i < len)
#  694|       hv = (hv << 8) | word[i++];
#  695|     while (i < len) {

Error: COMPILER_WARNING (CWE-195): [#def18]
hunspell-1.7.2/src/hunspell/hashmgr.cxx:695:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'}
#  695 |   while (i < len) {
#      |          ~~^~~~~
#  693|     while (i < 4 && i < len)
#  694|       hv = (hv << 8) | word[i++];
#  695|->   while (i < len) {
#  696|       ROTATE(hv, ROTATE_LEN);
#  697|       hv ^= word[i++];

Error: COMPILER_WARNING: [#def19]
hunspell-1.7.2/src/hunspell/hashmgr.cxx: scope_hint: In function 'std::__copy_move_backward_a2<true, unsigned short*, unsigned short*>(unsigned short*, unsigned short*, unsigned short*)unsigned short*'
hunspell-1.7.2/src/hunspell/hashmgr.cxx:1365:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/hashmgr.gcda' profile count data file not found
# 1365 | }
#      | ^
# 1363|   const std::vector<replentry>& HashMgr::get_reptable() const {
# 1364|     return reptable;
# 1365|-> }

Error: COMPILER_WARNING: [#def20]
hunspell-1.7.2/src/hunspell/hunspell.cxx: scope_hint: In function 'std::__advance<w_char*, long>(w_char*&, long, std::random_access_iterator_tag)void'
hunspell-1.7.2/src/hunspell/hunspell.cxx:2333:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/hunspell.gcda' profile count data file not found
# 2333 | }
#      | ^
# 2331|   void Hunspell_free_list(Hunhandle* pHunspell, char*** list, int n) {
# 2332|     reinterpret_cast<HunspellImpl*>(pHunspell)->free_list(list, n);
# 2333|-> }

Error: CPPCHECK_WARNING (CWE-457): [#def21]
hunspell-1.7.2/src/hunspell/hunzip.cxx:250: warning[uninitvar]: Uninitialized variable: linebuf
#  248|     else
#  249|       linebuf[l] = '\0';
#  250|->   strcpy(line + left, linebuf);
#  251|     dest.assign(line);
#  252|     return true;

Error: COMPILER_WARNING: [#def22]
hunspell-1.7.2/src/hunspell/hunzip.cxx: scope_hint: In member function 'std::__new_allocator<bit>::allocate(unsigned long, void const*)'
hunspell-1.7.2/src/hunspell/hunzip.cxx:253:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/hunzip.gcda' profile count data file not found
#  253 | }
#      | ^
#  251|     dest.assign(line);
#  252|     return true;
#  253|-> }

Error: COMPILER_WARNING: [#def23]
hunspell-1.7.2/src/hunspell/phonet.cxx: scope_hint: In function 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_move(char*, char const*, unsigned long)'
hunspell-1.7.2/src/hunspell/phonet.cxx:268:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/phonet.gcda' profile count data file not found
#  268 | } /**  end of function "phonet"  **/
#      | ^
#  266|   
#  267|     return target;
#  268|-> } /**  end of function "phonet"  **/

Error: COMPILER_WARNING: [#def24]
hunspell-1.7.2/src/hunspell/replist.cxx: scope_hint: In member function 'std::__new_allocator<replentry*>::allocate(unsigned long, void const*)'
hunspell-1.7.2/src/hunspell/replist.cxx:207:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/replist.gcda' profile count data file not found
#  207 | }
#      | ^
#  205|   
#  206|     return true;
#  207|-> }

Error: COMPILER_WARNING: [#def25]
hunspell-1.7.2/src/hunspell/suggestmgr.cxx: scope_hint: In member function 'int SuggestMgr::ngram(int, const std::vector<w_char>&, const std::vector<w_char>&, int)'
hunspell-1.7.2/src/hunspell/suggestmgr.cxx:1976:23: warning[-Wunused-but-set-variable=]: variable 'test' set but not used
# 1976 |   int nscore = 0, ns, test = 0, l1 = su1.size(), l2 = su2.size();
#      |                       ^~~~
# 1974|                         const std::vector<w_char>& su2,
# 1975|                         int opt) {
# 1976|->   int nscore = 0, ns, test = 0, l1 = su1.size(), l2 = su2.size();
# 1977|   
# 1978|     if (l2 == 0)

Error: COMPILER_WARNING: [#def26]
hunspell-1.7.2/src/hunspell/suggestmgr.cxx: scope_hint: In member function 'int SuggestMgr::ngram(int, const std::string&, const std::string&, int)'
hunspell-1.7.2/src/hunspell/suggestmgr.cxx:2020:43: warning[-Wunused-but-set-variable=]: variable 'test' set but not used
# 2020 |   int nscore = 0, ns, l1, l2 = s2.size(), test = 0;
#      |                                           ^~~~
# 2018|                         const std::string& s2,
# 2019|                         int opt) {
# 2020|->   int nscore = 0, ns, l1, l2 = s2.size(), test = 0;
# 2021|     
# 2022|     if (l2 == 0)

Error: COMPILER_WARNING: [#def27]
hunspell-1.7.2/src/hunspell/suggestmgr.cxx: scope_hint: In function 'std::__advance<w_char*, long>(w_char*&, long, std::random_access_iterator_tag)void'
hunspell-1.7.2/src/hunspell/suggestmgr.cxx:2252:1: warning[-Wmissing-profile]: '/builddir/build/BUILD/hunspell-1.7.2/src/hunspell/.libs/suggestmgr.gcda' profile count data file not found
# 2252 | }
#      | ^
# 2250|   int SuggestMgr::lcslen(const std::string& s, const std::string& s2) {
# 2251|     return lcslen(s.c_str(), s2.c_str());
# 2252|-> }

Error: COMPILER_WARNING (CWE-252): [#def28]
hunspell-1.7.2/src/tools/hunspell.cxx: scope_hint: In function ‘void interactive_interface(Hunspell**, char*, int)’
hunspell-1.7.2/src/tools/hunspell.cxx:1609:19: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
# 1609 |       (void)system((std::string("rmdir ") + odftmpdir).c_str());
#      |             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1607|           fprintf(stderr, gettext("Can't open %s.\n"), filename);
# 1608|         endwin();
# 1609|->       (void)system((std::string("rmdir ") + odftmpdir).c_str());
# 1610|         exit(1);
# 1611|       }

Error: COMPILER_WARNING (CWE-252): [#def29]
hunspell-1.7.2/src/tools/hunspell.cxx:1620:19: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
# 1620 |       (void)system((std::string("rmdir ") + odftmpdir).c_str());
#      |             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1618|         perror(gettext("Can't open inputfile"));
# 1619|         endwin();
# 1620|->       (void)system((std::string("rmdir ") + odftmpdir).c_str());
# 1621|         exit(1);
# 1622|       }

Error: CPPCHECK_WARNING (CWE-476): [#def30]
hunspell-1.7.2/src/tools/munch.cxx:609: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: hp
#  607|   
#  608|     hp->word = word;
#  609|->   hp->affstr = NULL;
#  610|     hp->keep = 0;
#  611|     hp->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def31]
hunspell-1.7.2/src/tools/munch.cxx:611: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: hp
#  609|     hp->affstr = NULL;
#  610|     hp->keep = 0;
#  611|->   hp->next = NULL;
#  612|   
#  613|     i = hash(word);

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-104.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namehunspell-1.7.3-2.fc45
diffbase-store-results-to/tmp/tmpwuiwamci/hunspell-1.7.3-2.fc45.tar.xz
diffbase-time-created2026-08-03 15:10:25
diffbase-time-finished2026-08-03 15:12:56
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpwuiwamci/hunspell-1.7.3-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpwuiwamci/hunspell-1.7.3-2.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-104.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namehunspell-1.7.2-11.fc44
store-results-to/tmp/tmpne1d2opb/hunspell-1.7.2-11.fc44.tar.xz
time-created2026-08-03 15:07:00
time-finished2026-08-03 15:10:13
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpne1d2opb/hunspell-1.7.2-11.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpne1d2opb/hunspell-1.7.2-11.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9