2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Fix outstanding 32/64 warnings on Linux gcc+clang.

This commit is contained in:
Rene Rivera
2020-09-09 21:49:17 -05:00
parent 84666e77fa
commit 84dae08aa0
10 changed files with 32 additions and 49 deletions

View File

@@ -229,20 +229,6 @@ static char const * string_set_insert( string_set * set, char const * string,
}
static struct hash_item * object_get_item( OBJECT * obj )
{
return (struct hash_item *)( (char *)obj - offsetof( struct hash_item, data
) );
}
static void object_validate( OBJECT * obj )
{
assert( obj );
assert( object_get_item( obj )->header.magic == OBJECT_MAGIC );
}
/*
* object_new_range() - create an object from a string of given length
*/
@@ -283,6 +269,20 @@ OBJECT * object_new( char const * const string )
#ifndef object_copy
static struct hash_item * object_get_item( OBJECT * obj )
{
return (struct hash_item *)( (char *)obj - offsetof( struct hash_item, data
) );
}
static void object_validate( OBJECT * obj )
{
assert( obj );
assert( object_get_item( obj )->header.magic == OBJECT_MAGIC );
}
/*
* object_copy() - return a copy of an object
*/