Fix string format specifiers.

Bug 15387371

Change-Id: I0f86d5ddcef0c2b6fc45164c730eb55f44c5c490
Reviewed-on: https://swiftshader-review.googlesource.com/4492
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Main/serialvalid.cpp b/src/Main/serialvalid.cpp
index d2176c1..009d976 100644
--- a/src/Main/serialvalid.cpp
+++ b/src/Main/serialvalid.cpp
@@ -42,7 +42,7 @@
 	long long serial_number;
 
 	
-	sscanf( decrypted_serial, "%2s%10llx%4x", dummy_prefix, &serial_number, &actual_checksum);
+	sscanf( decrypted_serial, "%2s%10llx%4lx", dummy_prefix, &serial_number, &actual_checksum);
 	strcpy(working_buffer, checksum_key);
 	strcat(working_buffer, decrypted_serial);
 	working_buffer[strlen(checksum_key) + PREFIX_LENGTH + ROOT_LENGTH] = '\0';
diff --git a/src/OpenGL/libGL/IndexDataManager.cpp b/src/OpenGL/libGL/IndexDataManager.cpp
index 492122d..69f6db3 100644
--- a/src/OpenGL/libGL/IndexDataManager.cpp
+++ b/src/OpenGL/libGL/IndexDataManager.cpp
@@ -174,7 +174,7 @@
 

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", initialSize);

+            ERR("Out of memory allocating an index buffer of size %u.", initialSize);

         }

     }

 

@@ -231,10 +231,10 @@
         mBufferSize = std::max(requiredSpace, 2 * mBufferSize);

 

 		mIndexBuffer = new sw::Resource(mBufferSize + 16);

-    

+

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating an index buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;

diff --git a/src/OpenGL/libGL/VertexDataManager.cpp b/src/OpenGL/libGL/VertexDataManager.cpp
index f322487..afdf033 100644
--- a/src/OpenGL/libGL/VertexDataManager.cpp
+++ b/src/OpenGL/libGL/VertexDataManager.cpp
@@ -214,10 +214,10 @@
     if(size > 0)

     {

         mVertexBuffer = new sw::Resource(size + 1024);

-        

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", size);

+            ERR("Out of memory allocating a vertex buffer of size %u.", size);

         }

     }

 }

@@ -307,10 +307,10 @@
         mBufferSize = std::max(mRequiredSpace, 3 * mBufferSize / 2);   // 1.5 x mBufferSize is arbitrary and should be checked to see we don't have too many reallocations.

 

 		mVertexBuffer = new sw::Resource(mBufferSize);

-    

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating a vertex buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;

diff --git a/src/OpenGL/libGLES_CM/IndexDataManager.cpp b/src/OpenGL/libGLES_CM/IndexDataManager.cpp
index d284efe..29be00a 100644
--- a/src/OpenGL/libGLES_CM/IndexDataManager.cpp
+++ b/src/OpenGL/libGLES_CM/IndexDataManager.cpp
@@ -156,7 +156,7 @@
 

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", initialSize);

+            ERR("Out of memory allocating an index buffer of size %u.", initialSize);

         }

     }

 

@@ -213,10 +213,10 @@
         mBufferSize = std::max(requiredSpace, 2 * mBufferSize);

 

 		mIndexBuffer = new sw::Resource(mBufferSize + 16);

-    

+

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating an index buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;

diff --git a/src/OpenGL/libGLES_CM/VertexDataManager.cpp b/src/OpenGL/libGLES_CM/VertexDataManager.cpp
index 44224fe..55d145c 100644
--- a/src/OpenGL/libGLES_CM/VertexDataManager.cpp
+++ b/src/OpenGL/libGLES_CM/VertexDataManager.cpp
@@ -208,10 +208,10 @@
     if(size > 0)

     {

         mVertexBuffer = new sw::Resource(size + 1024);

-        

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", size);

+            ERR("Out of memory allocating a vertex buffer of size %u.", size);

         }

     }

 }

@@ -301,10 +301,10 @@
         mBufferSize = std::max(mRequiredSpace, 3 * mBufferSize / 2);   // 1.5 x mBufferSize is arbitrary and should be checked to see we don't have too many reallocations.

 

 		mVertexBuffer = new sw::Resource(mBufferSize);

-    

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating a vertex buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;

diff --git a/src/OpenGL/libGLESv2/IndexDataManager.cpp b/src/OpenGL/libGLESv2/IndexDataManager.cpp
index 3f45936..120cd18 100644
--- a/src/OpenGL/libGLESv2/IndexDataManager.cpp
+++ b/src/OpenGL/libGLESv2/IndexDataManager.cpp
@@ -170,7 +170,7 @@
 

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", initialSize);

+            ERR("Out of memory allocating an index buffer of size %u.", initialSize);

         }

     }

 

@@ -227,10 +227,10 @@
         mBufferSize = std::max(requiredSpace, 2 * mBufferSize);

 

 		mIndexBuffer = new sw::Resource(mBufferSize + 16);

-    

+

         if(!mIndexBuffer)

         {

-            ERR("Out of memory allocating an index buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating an index buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;

diff --git a/src/OpenGL/libGLESv2/VertexDataManager.cpp b/src/OpenGL/libGLESv2/VertexDataManager.cpp
index 51aa4fb..173b176 100644
--- a/src/OpenGL/libGLESv2/VertexDataManager.cpp
+++ b/src/OpenGL/libGLESv2/VertexDataManager.cpp
@@ -222,10 +222,10 @@
     if(size > 0)

     {

         mVertexBuffer = new sw::Resource(size + 1024);

-        

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", size);

+            ERR("Out of memory allocating a vertex buffer of size %u.", size);

         }

     }

 }

@@ -315,10 +315,10 @@
         mBufferSize = std::max(mRequiredSpace, 3 * mBufferSize / 2);   // 1.5 x mBufferSize is arbitrary and should be checked to see we don't have too many reallocations.

 

 		mVertexBuffer = new sw::Resource(mBufferSize);

-    

+

         if(!mVertexBuffer)

         {

-            ERR("Out of memory allocating a vertex buffer of size %lu.", mBufferSize);

+            ERR("Out of memory allocating a vertex buffer of size %u.", mBufferSize);

         }

 

         mWritePosition = 0;