Workaround 'bad address arithmetic' static analysis tool false positive
authorIvan Maidanski <ivmai@mail.ru>
Sat, 17 Dec 2016 14:21:40 +0000 (17:21 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 17 Dec 2016 14:21:40 +0000 (17:21 +0300)
commitc82a4fe5aecdf71b931adb353540956edbc27498
tree1c6065d18505e9fc5db846627218045110475dc8
parent887dce09cabb172883395b88a31b9cfe98c0fa22
Workaround 'bad address arithmetic' static analysis tool false positive

The tool complains whether (alloc(size)+ofs) is intentional instead of
(alloc(size+ofs)).  In our case, it is a false alarm (the offset is
added to the result to align the allocation at HBLKSIZE boundary).

* os_dep.c [USE_WINALLOC && MSWIN32] (GC_win32_get_mem): Store result
of GlobalAlloc() to "result" local variable first (then, perform result
alignment in a standalone statement); add comment.
os_dep.c