]> granicus.if.org Git - gc/commitdiff
Fix printf format specifier in simple_example.md
authorIvan Maidanski <ivmai@mail.ru>
Tue, 26 Mar 2019 20:09:49 +0000 (23:09 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 27 Mar 2019 07:32:26 +0000 (10:32 +0300)
* doc/simple_example.md (Writing the program): Adjust printf format
specifier to match the argument type.

doc/simple_example.md

index e19d5686335a45472ac8114b01ab2fec5edb0bc3..1fefc83b5972253c8b405e8c8ec737ebcb5449bb 100644 (file)
@@ -99,7 +99,8 @@ The following program `loop.c` is a trivial example:
             assert(*p == 0);
             *p = (int *) GC_REALLOC(q, 2 * sizeof(int));
             if (i % 100000 == 0)
-                printf("Heap size = %d\n", GC_get_heap_size());
+                printf("Heap size = %lu bytes\n",
+                       (unsigned long)GC_get_heap_size());
         }
         return 0;
     }