KnightSch / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 1 forks source link

printf format flag incorrect #181

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Lines 423-424 of heap.c:
    C_DEBUG_PRINT(VERBOSITY_LOW, "heap_init(), id=%p, s=%d\n",
                  pmHeap.base, pmHeap.avail);
However, pmHeap.avail is a uint32_t per line 143 of heap.c. Therefore, the 
format flag should be s=%u, not s=%d.

Original issue reported on code.google.com by bjones460@gmail.com on 14 Jan 2011 at 4:49

GoogleCodeExporter commented 8 years ago
I've fixed this as suggested.
I to prove it would work by setting my heap to 0x80000000 and the compiler 
complained: """error: size of array ‘heap’ is too large"""
I will check in anyway; the change is easy to understand.

Original comment by dwhall...@gmail.com on 7 May 2011 at 10:33

GoogleCodeExporter commented 8 years ago
This issue was closed by revision cc1731a788fa.

Original comment by dwhall...@gmail.com on 7 May 2011 at 10:40