Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable assigned to itself #383

Closed
gcode-importer opened this issue Aug 24, 2014 · 2 comments
Closed

variable assigned to itself #383

gcode-importer opened this issue Aug 24, 2014 · 2 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 383

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.


Reported by detonin on 2014-08-24 21:01:11

@gcode-importer
Copy link
Author

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

Reported by szukw000 on 2014-08-30 00:49:10

@gcode-importer
Copy link
Author

indeed

Reported by detonin on 2014-09-30 12:24:27

  • Status changed: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants