]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
region: clean up some warnings
authorRay Strode <rstrode@redhat.com>
Wed, 9 Feb 2011 19:34:52 +0000 (14:34 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 9 Feb 2011 20:07:14 +0000 (15:07 -0500)
src/libply/ply-region.c

index 43836ea51798b647878bb4a5db237541055d9c7b..cbaca40391e815eeda80cbb6b3191483703e6301 100644 (file)
@@ -484,9 +484,7 @@ cover_with_rect(char             cover[COVER_SIZE][COVER_SIZE],
     {
       for (x=0; x<rectangle->width; x++)
         {
-          if (rectangle->x + x >= 0 &&
-              rectangle->y + y >= 0 &&
-              rectangle->x + x < COVER_SIZE &&
+          if (rectangle->x + x < COVER_SIZE &&
               rectangle->y + y < COVER_SIZE)
             {
               if (value)
@@ -524,7 +522,7 @@ do_test (void)
       rectangle.y = random() % COVER_SIZE-5;
       rectangle.width = 1 + random() % 20;
       rectangle.height = 1 + random() % 20;
-      printf("Adding X=%d Y=%d W=%d H=%d\n",
+      printf("Adding X=%ld Y=%ld W=%ld H=%ld\n",
               rectangle.x,
               rectangle.y,
               rectangle.width,
@@ -542,7 +540,7 @@ do_test (void)
        node = ply_list_get_next_node (rectangle_list, node))
     {
       ply_rectangle_t *small_rectangle = ply_list_node_get_data (node);
-      printf("Processed X=%d Y=%d W=%d H=%d\n",
+      printf("Processed X=%ld Y=%ld W=%ld H=%ld\n",
              small_rectangle->x,
              small_rectangle->y, 
              small_rectangle->width, 
@@ -556,7 +554,7 @@ do_test (void)
 
   for (y = 0; y < COVER_SIZE; y++)
     {
-      printf("%03d ", y);
+      printf("%03ld ", y);
       for (x = 0; x < COVER_SIZE; x++)
         {
           if (cover[y][x] >= 100)