Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int DvdRead(u32 lsn, u32 sectors, void *buf,
- CdRMode *mode)
- {
- u32 i;
- u8* buff;
- for (i=lsn; i<(lsn+sectors); i++)
- {
- if (CDVDreadTrack(i, CDVD_MODE_2048)==-1)
- return 0;
- buff = CDVDgetBuffer();
- if (buff==NULL) return 0;
- // switch (mode->datapattern){
- // case CdSecS2064:
- ((u32*)buf)[0] = i + 0x30000;
- memcpy_fast((u8*)buf+12, buff, 2048);
- buf = (char*)buf + 2064; break; <<<---
- // default:
- // return 0;
- // }
- }
- return 1;
- }
- This suspicious code was found in pcsx2 project by PVS-Studio static code analyzer.
- Warning message is:
- V612 An unconditional 'break' within a loop. pcsx2 cdvdiso.cpp 218
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment