Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TprintPrefs::TprintPrefs(IffdshowBase *Ideci,
- const TfontSettings *IfontSettings)
- {
- // This doesn't seem to help after optimization.
- memset(this, 0, sizeof(this));
- dx = dy = 0;
- isOSD = false;
- xpos = ypos = 0;
- align = 0;
- linespacing = 0;
- sizeDx = 0;
- sizeDy = 0;
- ...
- }
- Super! As always, the compiler is to blame. This is what should have been written here: sizeof(*this).
- This suspicious code was found in ffdshow project by PVS-Studio static code analyzer.
- Warning message is:
- V579 The memset function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the third argument. tfont.cpp 44
- 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