Module: Mesa
Branch: master
Commit: bf1974b37d6b92448b068dda8f8f4e9aab4dc537
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf1974b37d6b92448b068dda8f8f4e9aab4dc537

Author: Brian Paul <[email protected]>
Date:   Wed Mar 17 10:11:09 2010 -0600

progs/samples: silence warnings

---

 progs/samples/loadppm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/progs/samples/loadppm.c b/progs/samples/loadppm.c
index be056d6..adae9b4 100644
--- a/progs/samples/loadppm.c
+++ b/progs/samples/loadppm.c
@@ -9,7 +9,7 @@ static PPMImage *LoadPPM(const char *filename)
     char buff[16];
     PPMImage *result;
     FILE *fp;
-    int maxval;
+    int maxval, w, h;
 
     fp = fopen(filename, "rb");
     if (!fp)
@@ -37,11 +37,13 @@ static PPMImage *LoadPPM(const char *filename)
        exit(1);
     }
 
-    if (fscanf(fp, "%lu %lu", &result->sizeX, &result->sizeY) != 2)
+    if (fscanf(fp, "%d %d", &w, &h) != 2)
     {
        fprintf(stderr, "Error loading image `%s'\n", filename);
        exit(1);
     }
+    result->sizeX = w;
+    result->sizeY = h;
 
     if (fscanf(fp, "%d", &maxval) != 1)
     {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to