[m-rev.] for review: clean up bitmap.m

Zoltan Somogyi zoltan.somogyi at runbox.com
Sat Jan 1 12:29:31 AEDT 2022


For review by anyone.

I was originally intending to track down the cause of these warnings:

bitmap.m:742:37: warning: array subscript -1 is below array bounds of ‘MR_uint_least8_t[]’ {aka ‘unsigned char[]’} [-Warray-bounds]
bitmap.m:777:17: warning: array subscript -1 is below array bounds of ‘MR_uint_least8_t[]’ {aka ‘unsigned char[]’} [-Warray-bounds]

These come from the C foreign_procs of the unsafe_byte
getter and setter functions. These don't refer to -1,
so warnings must come from some other func or pred
that inlined both the foreign_procs and a reference to -1,
probably from byte_index_for_bit. I was intending to
replace the unsafe_byte getter and setter functions
with N copies, one for each of their call sites, and
see which copies (and therefore which call sites)
get the warnings, so we could try to fix them.
But I couldn't stand to work on code with rafe's
coding style, so I started with this cleanup.
The getter/setter split should be a separate diff,
to allow it to be undone easily once we got the list
of affected call sites.

BTW, http://testing.mercurylang.org says that
it is out of disk space. Peter, can you please fix that?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.bm
Type: application/octet-stream
Size: 1441 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220101/db9a2bcb/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.bm
Type: application/octet-stream
Size: 66895 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220101/db9a2bcb/attachment-0003.obj>


More information about the reviews mailing list