Opened 10 years ago

Closed 10 years ago

#7218 closed Bugs (fixed)

Regression from Changeset 79895: new calls to madvise() need to cast as necessary to caddr_t

Reported by: Hubert Tong <hstong@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

On the AIX tester we see:

"../boost/interprocess/mapped_region.hpp", line 762.52: 1540-0256 (S) A parameter of type "char *" cannot be initialized with an expression of type "void *".
"../boost/interprocess/mapped_region.hpp", line 762.52: 1540-1205 (I) The error occurred while converting to parameter 1 of "madvise(caddr_t, size_t, int)".

The call in question to madvise() is indeed invalid. The signature for madvise() on the AIX platform uses caddr_t (a typedef to char *) as the type of the first parameter.

A search seems to indicate that Solaris and HP-UX also use caddr_t.

Change History (3)

comment:1 by Ion Gaztañaga, 10 years ago

Thanks, for the report. Changeset 79964 should fix the problem. I can only test it in a x86 Solaris 11 Virtual Machine. It seems that Tru64 also uses caddr_t. Please let me know if this fixes the issue.

comment:2 by Hubert Tong <hstong@…>, 10 years ago

Yes, it fixes the issue.

comment:3 by Ion Gaztañaga, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.