PVS-StudioWarnings

PVS-Studio warning V614 for glibc

Nov 12th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. static int send_vc(....)
  2. {
  3.   ....
  4.   int truncating, connreset, resplen, n;
  5.   ....
  6.   #ifdef _STRING_ARCH_unaligned
  7.     *anssizp2 = orig_anssizp - resplen;
  8.     *ansp2 = *ansp + resplen;
  9.   #else
  10.   ....
  11. }
  12.  
  13. This suspicious code was found in glibc project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V614 Uninitialized variable 'resplen' used. res_send.c 790
  16.  
  17. 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