Examples of errors detected by the V590 diagnostic
V590. Possible excessive expression or typo. Consider inspecting the expression.
LLVM/Clang
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. DwarfDebug.cpp 485
void DwarfDebug::addSubprogramNames(....) { if (getAccelTableKind() != AccelTableKind::Apple && NameTableKind != DICompileUnit::DebugNameTableKind::Apple && NameTableKind == DICompileUnit::DebugNameTableKind::None) return; .... } PPSSPP
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. IRPassSimplify.cpp 1792
bool ApplyMemoryValidation(const IRWriter &in, IRWriter &out, const IROptions &opts) { .... for (IRInst inst : in.GetInstructions()) { IRMemoryOpInfo info = IROpMemoryAccessSize(inst.op); // Note: we only combine word aligned accesses. if (info.size != 0 && inst.src1 == MIPS_REG_SP && info.size == 4) // <= { .... } .... } .... } GZDoom
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. sc_man.cpp 829
bool FScanner::GetFloat (bool evaluate) { .... if(sym && sym->tokenType == TK_IntConst && sym->tokenType != TK_FloatConst) { BigNumber = sym->Number; Number = (int)sym->Number; Float = sym->Float; // String will retain the actual symbol name. return true; } .... } Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. sc_man.cpp 787
GTK
V590 [CWE-571, CERT-MSC01-C] Consider inspecting the 'str[0] == '\0' || str[0] != 'U'' expression. The expression is excessive or contains a misprint. gtkcomposetable.c 119
static gboolean is_codepoint (const char *str) { int i; /* 'U' is not code point but 'U00C0' is code point */ if (str[0] == '\0' || str[0] != 'U' || str[1] == '\0') return FALSE; for (i = 1; str[i] != '\0'; i++) { if (!g_ascii_isxdigit (str[i])) return FALSE; } return TRUE; } CodeLite
V590 Consider inspecting the 'where != std::string::npos && where == 0' expression. The expression is excessive or contains a misprint. dbgcmd.cpp:60
void wxGDB_STRIP_QUOATES(wxString& currentToken) { size_t where = currentToken.find(wxT("\"")); if (where != std::string::npos && where == 0) { currentToken.erase(0, 1); } .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'where != std::string::npos && where == 0' expression. The expression is excessive or contains a misprint. dbgcmd.cpp:70
Darwin-XNU
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. vfs_subr.c 3589
int vn_path_package_check(char *path, int pathlen, ....) { char *ptr, *end; int comp = 0; .... end = path + 1; while (end < path + pathlen && *end != '\0') { while (end < path + pathlen && *end == '/' && *end != '\0') { end++; } ptr = end; while (end < path + pathlen && *end != '/' && *end != '\0') { end++; } .... } .... } Command & Conquer
V590 Consider inspecting the 'i < 8 && i < 4' expression. The expression is excessive or contains a misprint. DLLInterface.cpp 2238
// Maximum number of multi players possible. #define MAX_PLAYERS 8 // max # of players we can have for (int i = 0; i < MAX_PLAYERS && i < 4; i++) { if (GlyphxPlayerIDs[i] == player_id) { MultiplayerStartPositions[i] = XY_Cell(x, y); } } ROOT
V590 Consider inspecting the '!file1 || c <= 0 || c == '*' || c != '('' expression. The expression is excessive or contains a misprint. TTabCom.cxx 840
TString TTabCom::DetermineClass(const char varName[]) { .... c = file1.get(); if (!file1 || c <= 0 || c == '*' || c != '(') { Error("TTabCom::DetermineClass", "variable \"%s\" not defined?", varName); goto cleanup; } .... } Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. TFile.cxx 3963
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. TStreamerInfoActions.cxx 3084
libarchive
V590 Consider inspecting the '* s != '\0' && * s == ' '' expression. The expression is excessive or contains a misprint. archive_cmdline.c 76
static ssize_t get_argument(struct archive_string *as, const char *p) { const char *s = p; archive_string_empty(as); /* Skip beginning space characters. */ while (*s != '\0' && *s == ' ') s++; .... } Haiku Operation System
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. writembr.cpp 99
int main(int argc, char** argv) { .... string choice; getline(cin, choice, '\n'); if (choice == "no" || choice == "" || choice != "yes") { cerr << "MBR was NOT written" << endl; fs.close(); return B_ERROR; } .... } Haiku Operation System
V590 Consider inspecting the '* ptr == ';' && * ptr != '\0'' expression. The expression is excessive or contains a misprint. pc.c 316
ULONG parse_expression(char *str) { .... ptr = skipwhite(ptr); while (*ptr == SEMI_COLON && *ptr != '\0') { ptr++; if (*ptr == '\0') continue; val = assignment_expr(&ptr); } .... } Haiku Operation System
V590 Consider inspecting the 'argc == 0 || argc != 2' expression. The expression is excessive or contains a misprint. cmds.c 2667
void unsetoption(int argc, char *argv[]) { .... if (argc == 0 || argc != 2) { fprintf(ttyout, "usage: %s option\n", argv[0]); return; } .... } Haiku Operation System
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. PoseView.cpp 5851
bool BPoseView::AttributeChanged(const BMessage* message) { .... result = poseModel->OpenNode(); if (result == B_OK || result != B_BUSY) break; .... } Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. Tracker.cpp 1714
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. if_ipw.c 1871
Qalculate!
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. Number.cc 6564
bool Number::add(const Number &o, MathOperation op) { .... if(i1 >= COMPARISON_RESULT_UNKNOWN && (i2 == COMPARISON_RESULT_UNKNOWN || i2 != COMPARISON_RESULT_LESS)) return false; .... } LibreOffice
V590 Consider inspecting the '* pData <= MAXLEVEL && * pData <= 9' expression. The expression is excessive or contains a misprint. ww8par2.cxx 756
const sal_uInt8 MAXLEVEL = 10; void SwWW8ImplReader::Read_ANLevelNo(....) { .... // Range WW:1..9 -> SW:0..8 no bullets / numbering if (*pData <= MAXLEVEL && *pData <= 9) { .... } else if( *pData == 10 || *pData == 11 ) { // remember type, the rest happens at Sprm 12 m_xStyles->mnWwNumLevel = *pData; } .... } LibreOffice
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. fileurl.cxx 55
OUString convertToFileUrl(char const * filename, ....) { .... if ((filename[0] == '.') || (filename[0] != SEPARATOR)) { .... } .... } NCBI Genome Workbench
V590 Consider inspecting the 'ch != '\0' && ch == ' '' expression. The expression is excessive or contains a misprint. cleanup_utils.cpp 580
bool Asn2gnbkCompressSpaces(string& val) { .... while (ch != '\0' && ch == ' ') { ptr++; ch = *ptr; } .... } Qt
V590 CWE-571 Consider inspecting the 'c < 'a' && c > 'z' && c < 'A' && c > 'Z'' expression. The expression is excessive or contains a misprint. qdir.cpp 77
#if defined(Q_OS_WIN) static QString driveSpec(const QString &path) { if (path.size() < 2) return QString(); char c = path.at(0).toLatin1(); if (c < 'a' && c > 'z' && c < 'A' && c > 'Z') return QString(); if (path.at(1).toLatin1() != ':') return QString(); return path.mid(0, 2); } #endif Krita
V590 Consider inspecting the 'state == (- 3) || state != 0' expression. The expression is excessive or contains a misprint. psd_pixel_utils.cpp 335
psd_status psd_unzip_without_prediction(psd_uchar *src_buf, psd_int src_len, psd_uchar *dst_buf, psd_int dst_len) { do { state = inflate(&stream, Z_PARTIAL_FLUSH); if(state == Z_STREAM_END) break; if(state == Z_DATA_ERROR || state != Z_OK) // <= break; } while (stream.avail_out > 0); } Audacity
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. ExtImportPrefs.cpp 600
void ExtImportPrefs::OnDelRule(wxCommandEvent& WXUNUSED(event)) { .... int msgres = wxMessageBox (_("...."), wxYES_NO, RuleTable); if (msgres == wxNO || msgres != wxYES) return; .... } EFL Core Libraries
V590 Consider inspecting the '* lptr == ' ' && * lptr != '\0'' expression. The expression is excessive or contains a misprint. embryo_cc_sc2.c 944
static int command(void) { .... while (*lptr == ' ' && *lptr != '\0') lptr++; .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'sym->ident == 9 || sym->ident != 10' expression. The expression is excessive or contains a misprint. embryo_cc_sc3.c 1782
- V590 Consider inspecting the '* p == '\n' || * p != '\"'' expression. The expression is excessive or contains a misprint. cpplib.c 4012
Scilab
V590 Consider inspecting the 'iType != - 1 && iType == 8' expression. The expression is excessive or contains a misprint. scilabview.cpp 175
void ScilabView::createObject(int iUID) { int iType = -1; int *piType = &iType; getGraphicObjectProperty(....); if (iType != -1 && iType == __GO_FIGURE__) { m_figureList[iUID] = -1; setCurrentFigure(iUID); } .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'iObjectType != - 1 && iObjectType == 5' expression. The expression is excessive or contains a misprint. sci_unglue.c 90
GCC
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. genmatch.c 3829
const cpp_token * parser::next () { const cpp_token *token; do { token = cpp_get_token (r); } while ( token->type == CPP_PADDING && token->type != CPP_EOF); // <= return token; } LLVM/Clang
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. ARMISelDAGToDAG.cpp 1565
bool ARMDAGToDAGISel::tryT1IndexedLoad(SDNode *N) { LoadSDNode *LD = cast<LoadSDNode>(N); EVT LoadedVT = LD->getMemoryVT(); ISD::MemIndexedMode AM = LD->getAddressingMode(); if (AM == ISD::UNINDEXED || // <= LD->getExtensionType() != ISD::NON_EXTLOAD || AM != ISD::POST_INC || // <= LoadedVT.getSimpleVT().SimpleTy != MVT::i32) return false; .... } The condition is long, so I'll highlight the most important part: AM == ISD::UNINDEXED || AM != ISD::POST_INC. This condition is redundant, and you can simplify it to: AM != ISD::POST_INC.
Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. ASTReader.cpp 4178
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. BracesAroundStatementsCheck.cpp 46
Chromium
V590 Consider inspecting the 'rv == OK || rv != ERR_ADDRESS_IN_USE' expression. The expression is excessive or contains a misprint. udp_socket_posix.cc 735
int UDPSocketPosix::RandomBind(const IPAddress& address) { DCHECK(bind_type_ == DatagramSocket::RANDOM_BIND && !rand_int_cb_.is_null()); for (int i = 0; i < kBindRetries; ++i) { int rv = DoBind(IPEndPoint(address, rand_int_cb_ .Run(kPortStart, kPortEnd))); if (rv == OK || rv != ERR_ADDRESS_IN_USE) // <= return rv; } return DoBind(IPEndPoint(address, 0)); } GDB
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. macrocmd.c 214
static void info_macro_command (char *args, int from_tty) { .... char *arg_start = args; int processing_args = 1; while (processing_args && arg_start && *arg_start == '-' && *arg_start != '\0') .... } GCC
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. gensupport.c 1640
static const char * alter_output_for_subst_insn (rtx insn, int alt) { const char *insn_out, *sp ; char *old_out, *new_out, *cp; int i, j, new_len; insn_out = XTMPL (insn, 3); if (alt < 2 || *insn_out == '*' || *insn_out != '@') return insn_out; .... } CryEngine V
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. goalop_crysis2.cpp 3779
void COPCrysis2FlightFireWeapons::ParseParam(....) { .... else if (!paused && (m_State == eFP_PAUSED) && // <= (m_State != eFP_PAUSED_OVERRIDE)) // <= .... } OpenSSL
V590 Consider inspecting the 'atype != - 1 && atype == 5' expression. The expression is excessive or contains a misprint. dh_ameth.c 670
static int dh_cms_set_peerkey(....) { .... int atype; .... /* Only absent parameters allowed in RFC XXXX */ if (atype != V_ASN1_UNDEF && atype == V_ASN1_NULL) goto err; .... } Nana
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. window_manager.cpp 467
void window_manager::destroy_handle(core_window_t* wd) { .... if((wd->other.category == category::root_tag::value) || (wd->other.category != category::frame_tag::value)) // <= { impl_->misc_register.erase(wd->root); impl_->wd_register.remove(wd); } } Open X-Ray Engine
V590 Consider inspecting the '(0 != txt[1]) && ('#' == txt[1])' expression. The expression is excessive or contains a misprint. elog.cpp 29
void ELogCallback(void *context, LPCSTR txt) { .... bool bDlg = ('#'==txt[0])||((0!=txt[1])&&('#'==txt[1])); if (bDlg){ int mt = ('!'==txt[0])||((0!=txt[1])&&('!'==txt[1]))?1:0; .... } } Similar errors can be found in some other places:
- V590 Consider inspecting the '(0 != txt[1]) && ('!' == txt[1])' expression. The expression is excessive or contains a misprint. elog.cpp 31
MongoDB
V590 Consider inspecting the 'c >= '0' && c <= '0'' expression. The expression is excessive or contains a misprint. queryutil.cpp 104
string simpleRegex(....) { .... else if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '0') || (c == '\0')) { // don't know what to do with these r = ss.str(); break; } .... } Wolfenstein 3D
V590 Consider inspecting the 'c >= 'A' && c <= 'A'' expression. The expression is excessive or contains a misprint. l_script.c 661
int PS_ReadNumber( script_t *script, token_t *token ) { .... while ( ( c >= '0' && c <= '9' ) || ( c >= 'a' && c <= 'f' ) || ( c >= 'A' && c <= 'A' ) ) .... } PHP:Hypertext Preprocessor
V590 Consider inspecting the '* walk == 0 || * walk != '}'' expression. The expression is excessive or contains a misprint. php_pcre.c 1033
static int preg_get_backref(char **str, int *backref) { .... register char *walk = *str; .... if (*walk == 0 || *walk != '}') .... } ReactOS
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. generictable.c 278
PVOID NTAPI RtlLookupElementGenericTableFull(....) { .... /* Check if we found anything */ if ((*SearchResult == TableEmptyTree) || (*SearchResult != TableFoundNode)) { return NULL; } .... } OpenToonz
V590 Consider inspecting the 'state == (- 3) || state != 0' expression. The expression is excessive or contains a misprint. psdutils.cpp 174
int psdUnzipWithoutPrediction(....) { .... do { state = inflate(&stream, Z_PARTIAL_FLUSH); if (state == Z_STREAM_END) break; if (state == Z_DATA_ERROR || state != Z_OK) // <= break; } while (stream.avail_out > 0); .... } The GTK+ Project
V590 Consider inspecting the 'str[0] == '\0' || str[0] != 'U'' expression. The expression is excessive or contains a misprint. gtkcomposetable.c 62
static gboolean is_codepoint (const gchar *str) { int i; /* 'U' is not code point but 'U00C0' is code point */ if (str[0] == '\0' || str[0] != 'U' || str[1] == '\0') return FALSE; for (i = 1; str[i] != '\0'; i++) { if (!g_ascii_isxdigit (str[i])) return FALSE; } return TRUE; } Oracle VM Virtual Box
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. vboxdispcm.cpp 288
HRESULT vboxDispCmSessionCmdGet(....) { .... Assert(hr == S_OK || hr == S_FALSE); if (hr == S_OK || hr != S_FALSE) // <= { return hr; } .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'err == 0L || err != 1237L' expression. The expression is excessive or contains a misprint. vboxdisplay.cpp 656
- V590 Consider inspecting the 'rc == 3209 || rc != (- 3210)' expression. The expression is excessive or contains a misprint. vd.cpp 10876
- V590 Consider inspecting the 'rc == 3209 || rc != (- 3210)' expression. The expression is excessive or contains a misprint. vd.cpp 10947
- And 2 additional diagnostic messages.
FreeBSD Kernel
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. sig_verify.c 94
enum uni_ieact { UNI_IEACT_CLEAR = 0x00, /* clear call */ .... } void uni_mandate_epref(struct uni *uni, struct uni_ie_epref *epref) { .... maxact = -1; FOREACH_ERR(e, uni) { if (e->ie == UNI_IE_EPREF) continue; if (e->act == UNI_IEACT_CLEAR) maxact = UNI_IEACT_CLEAR; else if (e->act == UNI_IEACT_MSG_REPORT) { if (maxact == -1 && maxact != UNI_IEACT_CLEAR) // <= maxact = UNI_IEACT_MSG_REPORT; } else if (e->act == UNI_IEACT_MSG_IGNORE) { if (maxact == -1) maxact = UNI_IEACT_MSG_IGNORE; } } .... } FreeBSD Kernel
V590 Consider inspecting the 'error == 0 || error != - 1' expression. The expression is excessive or contains a misprint. nd6.c 2119
int nd6_output_ifp(....) { .... /* Use the SEND socket */ error = send_sendso_input_hook(m, ifp, SND_OUT, ip6len); /* -1 == no app on SEND socket */ if (error == 0 || error != -1) // <= return (error); .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'error == 0 || error != 35' expression. The expression is excessive or contains a misprint. if_ipw.c 1855
- V590 Consider inspecting the 'error == 0 || error != 27' expression. The expression is excessive or contains a misprint. if_vmx.c 2747
ChakraCore
V590 Consider inspecting the 'sub[i] != '-' && sub[i] == '/'' expression. The expression is excessive or contains a misprint. rl.cpp 1388
const char * stristr ( const char * str, const char * sub ) { .... for (i = 0; i < len; i++) { if (tolower(str[i]) != tolower(sub[i])) { if ((str[i] != '/' && str[i] != '-') || (sub[i] != '-' && sub[i] == '/')) { / <= // if the mismatch is not between '/' and '-' break; } } } .... } Wine Is Not an Emulator
V590 Consider inspecting the 'lret == 0 || lret != 234' expression. The expression is excessive or contains a misprint. winemenubuilder.c 3430
static void cleanup_menus(void) { .... while (1) { .... lret = RegEnumValueW(....); if (lret == ERROR_SUCCESS || lret != ERROR_MORE_DATA) break; .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'last_error == 183 || last_error != 3' expression. The expression is excessive or contains a misprint. schedsvc.c 90
Mozilla Thunderbird
V590 Consider inspecting the 'type != (1) && type == (2)' expression. The expression is excessive or contains a misprint. nswindowsregkey.cpp 313
#define REG_SZ ( 1 ) #define REG_EXPAND_SZ ( 2 ) #define REG_MULTI_SZ ( 7 ) NS_IMETHODIMP nsWindowsRegKey::ReadStringValue(const nsAString& aName, nsAString& aResult) { .... if (type != REG_SZ && type == REG_EXPAND_SZ && type == REG_MULTI_SZ) { return NS_ERROR_FAILURE; } .... } FreeSWITCH
V590 Consider inspecting the '* data == ' ' && * data != '\0'' expression. The expression is excessive or contains a misprint. mod_curl.c 306
static char *print_json(switch_memory_pool_t *pool, ....) { .... while (*data == ' ' && *data != '\0') { data++; } .... } Unreal Engine 4
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. texturecompressormodule.cpp 1781
bool BuildTextureMips( const TArray<FImage>& InSourceMips, const FTextureBuildSettings& BuildSettings, TArray<FImage>& OutMipChain) { .... if (BuildSettings.MipGenSettings != TMGS_LeaveExistingMips || BuildSettings.MipGenSettings == TMGS_NoMipmaps || bLongLatCubemap) { NumSourceMips = 1; } .... } Godot Engine
V590 Consider inspecting the 'arg[0] != 0 && arg[0] == ' '' expression. The expression is excessive or contains a misprint. godot_win.cpp 175
int WINAPI WinMain(....,LPSTR lpCmdLine, ....) { .... char* arg; arg = lpCmdLine; .... while (arg[0] != 0 && arg[0] == ' ') { arg++; } .... } Haiku Operation System
V590 Consider inspecting the 'path[i] == '/' && path[i] != '\0'' expression. The expression is excessive or contains a misprint. storage_support.cpp 309
status_t parse_first_path_component(const char *path, int32& length, int32& nextComponent) { .... for (; path[i] == '/' && path[i] != '\0'; i++); // <= if (path[i] == '\0') // this covers "" as well nextComponent = 0; else nextComponent = i; .... } Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. PoseView.cpp 5773
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. Tracker.cpp 1728
- V590 Consider inspecting the '* ptr == ';' && * ptr != '\0'' expression. The expression is excessive or contains a misprint. pc.c 316
.NET CoreCLR
V590 Consider inspecting the 'wzPath[0] != L'\0' && wzPath[0] == L'\\'' expression. The expression is excessive or contains a misprint. cee_wks path.h 62
static inline bool HasUncPrefix(LPCWSTR wzPath) { _ASSERTE(!clr::str::IsNullOrEmpty(wzPath)); return wzPath[0] != W('\0') && wzPath[0] == W('\\') && wzPath[1] != W('\0') && wzPath[1] == W('\\') && wzPath[2] != W('\0') && wzPath[2] != W('?'); } Similar errors can be found in some other places:
- V590 Consider inspecting this expression. The expression is excessive or contains a misprint. cee_wks path.h 72
LibreOffice
V590 Consider inspecting the 'p[0] == 'C' || p[0] != 'c'' expression. The expression is excessive or contains a misprint. address.cxx 1593
sal_uInt16 ScRange::ParseCols( .... ) { .... const sal_Unicode* p = rStr.getStr(); .... case formula::FormulaGrammar::CONV_XL_R1C1: if ((p[0] == 'C' || p[0] != 'c') && NULL != (p = lcl_r1c1_get_col( p, rDetails, &aStart, &ignored ))) { .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'p[0] == 'R' || p[0] != 'r'' expression. The expression is excessive or contains a misprint. address.cxx 1652
Linux Kernel
V590 Consider inspecting the 'module_type == 0 || module_type != 68' expression. The expression is excessive or contains a misprint. dgap.c 6733
static int dgap_parsefile(char **in) { .... int module_type = 0; .... module_type = dgap_gettok(in); if (module_type == 0 || module_type != PORTS || module_type != MODEM) { pr_err("failed to set a type of module"); return -1; } .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'conc_type == 0 || conc_type != 65' expression. The expression is excessive or contains a misprint. dgap.c 6692
Tesseract
V590 Consider inspecting the 'wordstr[w] != '\0' && wordstr[w] == ' '' expression. The expression is excessive or contains a misprint. libtesseract303 baseapi.cpp 1742
bool TessBaseAPI::AdaptToWordStr( PageSegMode mode, const char* wordstr) { .... while (wordstr[w] != '\0' && wordstr[w] == ' ') ++w; .... } GNU C Library
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. dcigettext.c 582
char *DCIGETTEXT (....) { .... /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; .... } Most likely this is what should be written here: while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
ICU
V590 Consider inspecting the 'secS == 0 && secS != 0x00010101' expression. The expression is excessive or contains a misprint. ucol.cpp 7893
#define UCOL_NO_MORE_CES 0x00010101 static UCollationResult ucol_strcollRegular(....) { .... uint32_t secS; .... while((secS == 0 && secS != UCOL_NO_MORE_CES) || (isContinuation(secS) && !sInShifted)) { .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'secT == 0 && secT != 0x00010101' expression. The expression is excessive or contains a misprint. ucol.cpp 7909
Notepad++
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. Notepad++ notepad_plus.cpp 853
int Notepad_plus::getHtmlXmlEncoding(....) const { .... if (langT != L_XML && langT != L_HTML && langT == L_PHP) return -1; .... } Currently this code is equivalent to if (langT == L_PHP). The programmer probably wanted to write this code: if (langT != L_XML && langT != L_HTML && langT != L_PHP).
ReactOS
V590 Consider inspecting the '* token == ' ' && * token != '\0'' expression. The expression is excessive or contains a misprint. wininet http.c 800
static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm ) { .... while (*token == ' ' && *token != '\0') token++; .... } //Enough: while (*token == ' ') token++; Similar errors can be found in some other places:
- V590 Consider inspecting the '* realm == ' ' && * realm != '\0'' expression. The expression is excessive or contains a misprint. wininet http.c 794
- V590 Consider inspecting the '* str == ' ' && * str != '\0'' expression. The expression is excessive or contains a misprint. wininet http.c 762
FCEUX
V590 Consider inspecting the 'appliedSize == 'b' && appliedSize != 's'' expression. The expression is excessive or contains a misprint. fceux ram_search.cpp 877
bool Set_RS_Val() { .... int appliedSize = rs_type_size; int appliedSign = rs_t; if(rs_c == 'n') appliedSize = 'w', appliedSign = 'u'; if(rs_c == 'a') appliedSize = 'd', appliedSign = 'u'; if((appliedSize == 'b' && appliedSize == 's' && (rs_param < -128 || rs_param > 127)) || (appliedSize == 'b' && appliedSize != 's' && (rs_param < 0 || rs_param > 255)) || (appliedSize == 'w' && appliedSize == 's' && (rs_param < -32768 || rs_param > 32767)) || (appliedSize == 'w' && appliedSize != 's' && (rs_param < 0 || rs_param > 65535))) return false; .... } Similar errors can be found in some other places:
- V590 Consider inspecting the 'appliedSize == 'w' && appliedSize != 's'' expression. The expression is excessive or contains a misprint. fceux ram_search.cpp 879
Stickies
V590 Consider inspecting the '* pBuff == ' ' && * pBuff != '\0'' expression. The expression is excessive or contains a misprint. stickies stickygrep.cpp 875
void ExtractHexFromEdit (....) { .... while (*pBuff == ' ' && *pBuff != '\0') pBuff++; .... } Although this is not an error, this operation is unnecessary.