PVS-StudioWarnings

PVS-Studio warning V576 for iecsdk

Nov 12th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. int main(void) {
  2.   ...
  3.   printf(
  4.     "Attach to [%s] Has Failed Possibly Because of"
  5.     " a platform UUID variant.\n",
  6.     pl_config_file_name,
  7.     pld
  8.   );
  9.   ...
  10. }
  11.  
  12. Should either add "%i" or remove the "pld" argument.
  13.  
  14. This suspicious code was found in iecsdk project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V576 Incorrect format. A different number of actual arguments is expected while calling 'printf' function. Expected: 2. Present: 3. uuid_variant_sample uuid_variant_sample.c 259
  17.  
  18. 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