Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Computation  at ftype-string.c:94

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

string_repr_len

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/ftypes/ftype-string.c)expand/collapse
Show more  
 64  string_repr_len(fvalue_t *fv, ftrepr_t rtype)
 65  {
 66          gchar *p, c;
 67          int repr_len;
 68   
 69          switch (rtype) {
 70                  case FTREPR_DISPLAY:
 71                          return (int)strlen(fv->value.string);
 72                  case FTREPR_DFILTER:
 73                          repr_len = 0;
 74                          for (p = fv->value.string; (c = *p) != '\0'; p++) {
 75                                  /* Backslashes and double-quotes must 
 76                                   * be escaped */
 77                                  if (c == '\\' || c == '"') {
 78                                          repr_len += 2;
 79                                  }
 80                                  /* Values that can't nicely be represented 
 81                                   * in ASCII need to be escaped. */
 82                                  else if (!isprint((unsigned char)c)) {
 83                                          /* c --> \xNN */
 84                                          repr_len += 4;
 85                                  }
 86                                  /* Other characters are just passed through. */
 87                                  else {
 88                                          repr_len++;
 89                                  }
 90                          }
 91                          return repr_len + 2;    /* string plus leading and trailing quotes */
 92          }
 93          g_assert_not_reached();
 94          return -1;
 95  }
Show more  




Change Warning 1118.29707 : Unreachable Computation

Priority:
State:
Finding:
Owner:
Note: