Text   |  XML   |  ReML   |   Visible Warnings:

Unused Value  at packet-icmpv6.c:889

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

bitrange0

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-icmpv6.c)expand/collapse
Show more  
 883  bitrange0(guint32 v, int s, emem_strbuf_t *strbuf)
 884  {
 885          guint32 v0;
 886          int off;
 887          int i;
 888   
 889          v0 = v;
 890          off = 0;
 891          while (off < 32) {
 892                  /* shift till we have 0x01 */
 893                  if ((v & 0x01) == 0) {
 894                          switch (v & 0x0f) {
 895                          case 0x00:
 896                                  v >>= 4; off += 4; continue;
 897                          case 0x08:
 898                                  v >>= 3; off += 3; continue;
 899                          case 0x04: case 0x0c:
 900                                  v >>= 2; off += 2; continue;
 901                          default:
 902                                  v >>= 1; off += 1; continue;
 903                          }
 904                  }
 905   
 906                  /* we have 0x01 with us */
 907                  for (i = 0; i < 32 - off; i++) {
 908                          if ((v & (0x01 << i)) == 0)
 909                                  break;
 910                  }
 911                  if (i == 1)
 912                          ep_strbuf_append_printf(strbuf, ",%d", s + off);
 913                  else {
 914                          ep_strbuf_append_printf(strbuf, ",%d-%d", s + off,
 915                              s + off + i - 1);
 916                  }
 917                  v >>= i; off += i;
 918          }
 919  }
Show more  




Change Warning 2660.30538 : Unused Value

Priority:
State:
Finding:
Owner:
Note: