iron261 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

variable assigned to itself #383

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
see http://www.viva64.com/en/b/0271/#ID0EWAAG

OPJ_SIZE_T opj_stream_write_skip (....)
{
  ....
  if (!l_is_written)
  {
    p_stream->m_status |= opj_stream_e_error;
    p_stream->m_bytes_in_buffer = 0;
    p_stream->m_current_data = p_stream->m_current_data;
    return (OPJ_SIZE_T) -1;
  }
  ....
}
PVS-Studio's diagnostic message: V570 The 'p_stream->m_current_data' variable 
is assigned to itself. cio.c 675

Something is messed up in this code. A variable is assigned its own value.

Original issue reported on code.google.com by antonin on 24 Aug 2014 at 9:01

GoogleCodeExporter commented 9 years ago
last found in

 openjpeg-2.x-trunk-r2577/src/lib/openjp2/cio.c

not found in

 openjpeg-2.x-trunk-r2694/src/lib/openjp2/cio.c

winfried

Original comment by szukw...@arcor.de on 30 Aug 2014 at 12:49

GoogleCodeExporter commented 9 years ago
indeed

Original comment by antonin on 30 Sep 2014 at 12:24