+2003-05-21 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
+ Cast via void* to avoid -Wcast-align warnings.
+ (__default_alloc_template::_S_refill): Likewise.
+
2003-05-20 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/README: Move to...
_Obj* volatile* __my_free_list =
_S_free_list + _S_freelist_index(__bytes_left);
- ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list;
- *__my_free_list = (_Obj*)_S_start_free;
+ ((_Obj*)(void*)_S_start_free) -> _M_free_list_link = *__my_free_list;
+ *__my_free_list = (_Obj*)(void*)_S_start_free;
}
_S_start_free = (char*) __new_alloc::allocate(__bytes_to_get);
if (_S_start_free == 0)
__my_free_list = _S_free_list + _S_freelist_index(__n);
// Build free list in chunk.
- __result = (_Obj*)__chunk;
- *__my_free_list = __next_obj = (_Obj*)(__chunk + __n);
+ __result = (_Obj*)(void*)__chunk;
+ *__my_free_list = __next_obj = (_Obj*)(void*)(__chunk + __n);
for (__i = 1; ; __i++)
{
__current_obj = __next_obj;
- __next_obj = (_Obj*)((char*)__next_obj + __n);
+ __next_obj = (_Obj*)(void*)((char*)__next_obj + __n);
if (__nobjs - 1 == __i)
{
__current_obj -> _M_free_list_link = 0;