Examples of errors detected by the V1044 diagnostic


V1044. Loop break conditions do not depend on the number of iterations.


Mozilla Thunderbird

V1044 Loop break conditions do not depend on the number of iterations. mimemoz2.cpp 1795


void ResetChannelCharset(MimeObject *obj) {
  ....
  if (cSet) {
    char *ptr2 = cSet;
    while ((*cSet) && (*cSet != ' ') && (*cSet != ';') &&
           (*cSet != '\r') && (*cSet != '\n') && (*cSet != '"'))
      ptr2++;

    if (*cSet) {
      PR_FREEIF(obj->options->default_charset);
      obj->options->default_charset = strdup(cSet);
      obj->options->override_charset = true;
    }

    PR_FREEIF(cSet);
  }
  ....
}


Bugs Found

Checked Projects
361
Collected Errors
13 417