THRIFT-4745: fixes compiler warnings
diff --git a/compiler/cpp/src/thrift/generate/t_js_generator.cc b/compiler/cpp/src/thrift/generate/t_js_generator.cc
index d30ce41..e7f625c 100644
--- a/compiler/cpp/src/thrift/generate/t_js_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_js_generator.cc
@@ -42,9 +42,9 @@
 
 static const string endl = "\n"; // avoid ostream << std::endl flushes
 // largest consecutive integer representable by a double (2 ^ 53 - 1)
-static const long max_safe_integer = 0x1fffffffffffff;
+static const int64_t max_safe_integer = 0x1fffffffffffff;
 // smallest consecutive number representable by a double (-2 ^ 53 + 1)
-static const long min_safe_integer = -max_safe_integer;
+static const int64_t min_safe_integer = -max_safe_integer;
 
 #include "thrift/generate/t_oop_generator.h"
 
diff --git a/lib/py/src/ext/endian.h b/lib/py/src/ext/endian.h
index 91372a7..1660cbd 100644
--- a/lib/py/src/ext/endian.h
+++ b/lib/py/src/ext/endian.h
@@ -79,6 +79,10 @@
 #include <byteswap.h>
 #define ntohll(n) bswap_64(n)
 #define htonll(n) bswap_64(n)
+#elif defined(_MSC_VER)
+#include <stdlib.h>
+#define ntohll(n) _byteswap_uint64(n)
+#define htonll(n) _byteswap_uint64(n)
 #else /* GNUC & GLIBC */
 #define ntohll(n) ((((unsigned long long)ntohl(n)) << 32) + ntohl(n >> 32))
 #define htonll(n) ((((unsigned long long)htonl(n)) << 32) + htonl(n >> 32))
diff --git a/lib/py/src/protocol/TCompactProtocol.py b/lib/py/src/protocol/TCompactProtocol.py
index da50513..baaec65 100644
--- a/lib/py/src/protocol/TCompactProtocol.py
+++ b/lib/py/src/protocol/TCompactProtocol.py
@@ -161,7 +161,7 @@
         # writes this out as a "var int" which is always positive, and attempting
         # to write a negative number results in an infinite loop, so we may
         # need to do some conversion here...
-        tseqid = seqid;
+        tseqid = seqid
         if tseqid < 0:
             tseqid = 2147483648 + (2147483648 + tseqid)
         self.__writeVarint(tseqid)
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index f7c4912..33ba203 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -74,7 +74,7 @@
 {
     public:
         TPedanticProtocol(std::shared_ptr<TTransport>& transport)
-          : _P(transport), m_last_seqid(std::numeric_limits<int32_t>::max() - 10) { }
+          : _P(transport), m_last_seqid((std::numeric_limits<int32_t>::max)() - 10) { }
 
         virtual uint32_t writeMessageBegin_virt(const std::string& name,
                                            const TMessageType messageType,