Examples of errors detected by the V779 diagnostic.

V779. Unreachable code detected. It is possible that an error is present.


Far2l

V779 Unreachable code detected. It is possible that an error is present. 7z.cpp 203


BOOL WINAPI _export SEVENZ_OpenArchive(const char *Name,
                                       int *Type)
{
  Traverser *t = new Traverser(Name);
  if (!t->Valid())
  {
    return FALSE;
    delete t;          // <=
  }

  delete s_selected_traverser;
  s_selected_traverser = t;
  return TRUE;
}

FreeBSD Kernel

V779 Unreachable code detected. It is possible that an error is present. if_wi_pci.c 258


static int
wi_pci_resume(device_t dev)
{
  struct wi_softc  *sc = device_get_softc(dev);
  struct ieee80211com *ic = &sc->sc_ic;

  WI_LOCK(sc);
  if (sc->wi_bus_type != WI_BUS_PCI_NATIVE) {
    return (0);                                 // <=
    WI_UNLOCK(sc);                              // <=
  }
  if (ic->ic_nrunning > 0)
    wi_init(sc);
  WI_UNLOCK(sc);
  return (0);
}

Identical errors can be found in some other places:

  • V779 Unreachable code detected. It is possible that an error is present. efx_mcdi.c 910
  • V779 Unreachable code detected. It is possible that an error is present. mps.c 1306
  • V779 Unreachable code detected. It is possible that an error is present. sctp_pcb.c 183


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++ and C#

goto PVS-Studio;