Fix some msvc C4244 warnings, also useless cast (ptime)
[novacoin.git] / src / util.cpp
index 8cc62eb..f47d1de 100644 (file)
@@ -1155,7 +1155,7 @@ string randomStrGen(int length) {
 
 void createConf()
 {
-    srand(time(NULL));
+    srand(static_cast<unsigned int>(time(NULL)));
 
     ofstream pConf;
 #if BOOST_FILESYSTEM_VERSION >= 3
@@ -1271,7 +1271,7 @@ void ShrinkDebugFile()
     {
         // Restart the file with some of the end
         char pch[200000];
-        fseek(file, (long long)-sizeof(pch), SEEK_END);
+        fseek(file, -((long long)sizeof(pch)), SEEK_END);
         int nBytes = fread(pch, 1, sizeof(pch), file);
         fclose(file);