PVS-StudioWarnings

PVS-Studio warning V519 for WebKit

Nov 11th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. static v8::Handle<v8::Value>
  2. toV8Object(....)
  3. {
  4.   switch (extension->name()) {
  5.     ....
  6.     case WebGLExtension::WebGLCompressedTextureATCName:
  7.       extensionObject = toV8(....);
  8.       referenceName = "webGLCompressedTextureATCName";
  9.     case WebGLExtension::WebGLCompressedTexturePVRTCName:
  10.       extensionObject = toV8(....);
  11.       referenceName = "webGLCompressedTexturePVRTCName";
  12.       break;
  13.   }
  14.   ....
  15. }
  16.  
  17. This suspicious code was found in WebKit project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V519 The 'extensionObject' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 222, 225. V8WebGLRenderingContextCustom.cpp 225
  20.  
  21. 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