diff --git a/ccmain/control.cpp b/ccmain/control.cpp index 66a2a8bb3e..2e17727730 100644 --- a/ccmain/control.cpp +++ b/ccmain/control.cpp @@ -1400,7 +1400,6 @@ void Tesseract::ReportXhtFixResult(bool accept_new_word, float new_x_ht, // Returns true if the word was changed. // See the comment in fixxht.cpp for a description of the overall process. bool Tesseract::TrainedXheightFix(WERD_RES *word, BLOCK* block, ROW *row) { - bool accept_new_x_ht = false; int original_misfits = CountMisfitTops(word); if (original_misfits == 0) return false; diff --git a/ccmain/fixspace.cpp b/ccmain/fixspace.cpp index e42617c053..f58c9610fa 100644 --- a/ccmain/fixspace.cpp +++ b/ccmain/fixspace.cpp @@ -831,7 +831,6 @@ namespace tesseract { inT16 Tesseract::fp_eval_word_spacing(WERD_RES_LIST &word_res_list) { WERD_RES_IT word_it(&word_res_list); WERD_RES *word; - inT16 word_length; inT16 score = 0; inT16 i; float small_limit = kBlnXHeight * fixsp_small_outlines_size; @@ -840,7 +839,6 @@ inT16 Tesseract::fp_eval_word_spacing(WERD_RES_LIST &word_res_list) { word = word_it.data(); if (word->rebuild_word == NULL) continue; // Can't handle cube words. - word_length = word->reject_map.length(); if (word->done || word->tess_accepted || word->best_choice->permuter() == SYSTEM_DAWG_PERM || diff --git a/cube/cube_utils.cpp b/cube/cube_utils.cpp index c9c7d86f09..13c9c236da 100644 --- a/cube/cube_utils.cpp +++ b/cube/cube_utils.cpp @@ -310,7 +310,7 @@ bool CubeUtils::IsCaseInvariant(const char_32 *str32, CharSet *char_set) { if (first_upper) capitalized = true; prev_upper = first_upper; - prev_lower = islower(str32[0]); + prev_lower = first_lower; for (int c = 1; str32[c] != 0; ++c) { cur_upper = isupper(str32[c]); cur_lower = islower(str32[c]); @@ -329,7 +329,7 @@ bool CubeUtils::IsCaseInvariant(const char_32 *str32, CharSet *char_set) { if (first_upper) capitalized = true; prev_upper = first_upper; - prev_lower = unicharset->get_islower(char_set->ClassID(str32[0])); + prev_lower = first_lower; for (int c = 1; c < StrLen(str32); ++c) { cur_upper = unicharset->get_isupper(char_set->ClassID(str32[c])); diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp index 62677f2a14..2ac94ee80f 100644 --- a/viewer/svutil.cpp +++ b/viewer/svutil.cpp @@ -372,7 +372,7 @@ static int GetAddrInfo(const char* hostname, int port, struct addrinfo** address) { #if defined(__linux__) char port_str[40]; - snprintf(port_str, 40, "%ld", port); + snprintf(port_str, 40, "%d", port); return getaddrinfo(hostname, port_str, NULL, address); #else return GetAddrInfoNonLinux(hostname, port, address);