diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 8621d2e77609ede105a6a0150381736fee1449cd..9db1dee381f6f91cdc5221ac2feb75107668de86 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -3487,7 +3487,7 @@ bool SystemInformationImplementation::QueryLinuxMemory()
     bool have[6] = { false, false, false, false, false, false };
     unsigned long value[6];
     int count = 0;
-    while(fgets(buffer, sizeof(buffer), fd))
+    while(fgets(buffer, static_cast<int>(sizeof(buffer)), fd))
       {
       for(int i=0; i < 6; ++i)
         {
diff --git a/testIOS.cxx b/testIOS.cxx
index 3b971e268763f0b3224894f34be06bf6a0124ddf..f0c7f1a7bc193cc373f9c1d6e6448a3b0536a613 100644
--- a/testIOS.cxx
+++ b/testIOS.cxx
@@ -48,7 +48,7 @@ int testIOS(int, char*[])
     return 1;
     }
   static const unsigned char array[] = { 0xff,0x4f,0xff,0x51,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x01,0x01,0xff,0x52,0x00,0x0c,0x00,0x00,0x00,0x01,0x00,0x05,0x04,0x04,0x00,0x01,0xff,0x5c,0x00,0x13,0x40,0x40,0x48,0x48,0x50,0x48,0x48,0x50,0x48,0x48,0x50,0x48,0x48,0x50,0x48,0x48,0x50,0xff,0x64,0x00,0x2c,0x00,0x00,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x62,0x79,0x20,0x49,0x54,0x4b,0x2f,0x47,0x44,0x43,0x4d,0x2f,0x4f,0x70,0x65,0x6e,0x4a,0x50,0x45,0x47,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x31,0x2e,0x30,0xff,0x90,0x00,0x0a,0x00,0x00,0x00,0x00,0x06,0x2c,0x00,0x01,0xff,0x93,0xcf,0xb0,0x18,0x08,0x7f,0xc6,0x99,0xbf,0xff,0xc0,0xf8,0xc1,0xc1,0xf3,0x05,0x81,0xf2,0x83,0x0a,0xa5,0xff,0x10,0x90,0xbf,0x2f,0xff,0x04,0xa8,0x7f,0xc0,0xf8,0xc4,0xc1,0xf3,0x09,0x81,0xf3,0x0c,0x19,0x34 };
-  const unsigned int narray = sizeof(array); // 180
+  const size_t narray = sizeof(array); // 180
   kwsys_ios::stringstream strstr;
   strstr.write( (char*)array, narray );
   //strstr.seekp( narray / 2 ); // set position of put pointer in mid string