PVS-StudioWarnings

PVS-Studio warning V665 for PostgreSQL

Nov 13th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #if _MSC_VER >= 1600
  2. #pragma warning(disable:4005)
  3. #define EMSGSIZE WSAEMSGSIZE
  4. #define EAFNOSUPPORT WSAEAFNOSUPPORT
  5. #define EWOULDBLOCK WSAEWOULDBLOCK
  6. #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
  7. #define ECONNRESET WSAECONNRESET
  8. #define EINPROGRESS WSAEINPROGRESS
  9. #define ENOBUFS WSAENOBUFS
  10. #define ECONNREFUSED WSAECONNREFUSED
  11. #define EOPNOTSUPP WSAEOPNOTSUPP
  12. #pragma warning(default:4005)
  13. #endif
  14.  
  15. This suspicious code was found in PostgreSQL project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V665 Possibly, the usage of '#pragma warning(default: X)' is incorrect in this context. The '#pragma warning(push/pop)' should be used instead. Check lines: 303, 313. postgres pg_config_os.h 313
  18.  
  19. 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