Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct ObjectGroups{
- componentList objectGrpCompList;
- int objectGroupId;
- short objectGrpColor;
- void write(FILE* file) const;
- }* objectGroups;
- void write(FILE* file) const
- {
- size_t size = sizeof(objectGroups)/sizeof(ObjectGroups);
- for(size_t i=0; i<size; ++i)
- {
- objectGroups[i].write(file);
- if(i+1<size) fprintf(file," ");
- }
- }
- This suspicious code was found in OpenCOLLADA project by PVS-Studio static code analyzer.
- Warning message is:
- V514 Dividing sizeof a pointer 'sizeof (objectGroups)' by another value. There is a probability of logical error presence. mayadmdagnode.h 40
- 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