sun4/os/fillsysinfo.c and sun4v/os/fillsysinfo.c trigger warnings
when built with gcc. These warnings are caused by casts from integers
to pointers which are different sizes. The standards do not specify
whether such casts cause sign extension; gcc sign-extends and warns
while Studio does neither. The safe way to keep the current behaviour
is to cast to uintptr_t first.
The format strings passed to VPRINTF in fill_address are also incorrect;
they use %x to print pointer values; %p is needed here.
See suggested fix for more detail.
|