Our website uses cookies to enhance your browsing experience.
Accept
to the top

Lucky hour! Grab a free trial license — offer ends in 00:59:58. Claim now

>
>
>
Examples of errors detected by the...

Examples of errors detected by the V8016 diagnostic

V8016. The loop may be executed incorrectly or its condition will never be met. Inspect initial and final values in the 'for' loop.


photoprism

V8016 The loop condition will never be met. Inspect initial and final values in the 'for' loop. optics.go 321


func (c *opticsClusterer) extract() {
  ....
  switch {
  case math.Abs(d) <= c.xi:
    cs = areas[j].start
    ce = ue
  case d > c.xi:
    for k := areas[j].end; k > areas[j].end; k-- {  // <=
      if ....{
        cs = k
        break
      }
    }
    ce = ue
  default:
    cs = areas[j].start
    for k := i; k < e; k++ {
      if ....{
        ce = k
        break
      }
    }
  }
  ....
}