Advertisement
stuw

cppcheck and uninitizlized vars

Mar 23rd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. % cat test1.cpp
  2. class myClass
  3. {
  4.     public:
  5.         myClass()
  6.         {
  7. #ifdef USE_UNKNOWN_FUNC
  8.             boo();
  9. #endif
  10.         }
  11.     private:
  12.         uint32_t myvar;
  13. };
  14.  
  15.  
  16. % cppcheck --enable=warning test1.cpp
  17. Checking test1.cpp...
  18. [test1.cpp:4]: (warning) Member variable 'myClass::myvar' is not initialized in the constructor.
  19. Checking test1.cpp: USE_UNKNOWN_FUNC...
  20.  
  21. % cppcheck --version
  22. Cppcheck 1.72
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement