Warning fixes.
ISO C99 doesn’t support unnamed structs/unions. Comparison of distinct pointer types lacks a cast. Dereferencing type-punned pointer will break strict-aliasing rules. Type of bit-field ‘ext’ is a GCC extension. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -294,8 +294,8 @@ typedef enum
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
mem_cpointer_t getter_p : ECMA_POINTER_FIELD_WIDTH; /**< pointer to getter object */
|
||||
mem_cpointer_t setter_p : ECMA_POINTER_FIELD_WIDTH; /**< pointer to setter object */
|
||||
__extension__ mem_cpointer_t getter_p : ECMA_POINTER_FIELD_WIDTH; /**< pointer to getter object */
|
||||
__extension__ mem_cpointer_t setter_p : ECMA_POINTER_FIELD_WIDTH; /**< pointer to setter object */
|
||||
} ecma_getter_setter_pointers_t;
|
||||
|
||||
/**
|
||||
@@ -307,7 +307,7 @@ typedef struct __attr_packed___ ecma_property_t
|
||||
unsigned int type : 2;
|
||||
|
||||
/** Compressed pointer to next property */
|
||||
mem_cpointer_t next_property_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t next_property_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
|
||||
/** Property's details (depending on Type) */
|
||||
union
|
||||
@@ -316,10 +316,10 @@ typedef struct __attr_packed___ ecma_property_t
|
||||
struct __attr_packed___ ecma_named_data_property_t
|
||||
{
|
||||
/** Value */
|
||||
ecma_value_t value : ECMA_VALUE_SIZE;
|
||||
__extension__ ecma_value_t value : ECMA_VALUE_SIZE;
|
||||
|
||||
/** Compressed pointer to property's name (pointer to String) */
|
||||
mem_cpointer_t name_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t name_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
|
||||
/** Flag indicating whether the property is registered in LCache */
|
||||
unsigned int is_lcached : 1;
|
||||
@@ -338,7 +338,7 @@ typedef struct __attr_packed___ ecma_property_t
|
||||
struct __attr_packed___ ecma_named_accessor_property_t
|
||||
{
|
||||
/** Compressed pointer to property's name (pointer to String) */
|
||||
mem_cpointer_t name_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t name_p : ECMA_POINTER_FIELD_WIDTH;
|
||||
|
||||
/** Attribute 'Enumerable' (ecma_property_enumerable_value_t) */
|
||||
unsigned int enumerable : 1;
|
||||
@@ -350,7 +350,7 @@ typedef struct __attr_packed___ ecma_property_t
|
||||
unsigned int is_lcached : 1;
|
||||
|
||||
/** Compressed pointer to pair of pointers - to property's getter and setter */
|
||||
mem_cpointer_t getter_setter_pair_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t getter_setter_pair_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
} named_accessor_property;
|
||||
|
||||
/** Description of internal property */
|
||||
@@ -795,10 +795,10 @@ typedef struct ecma_string_t
|
||||
lit_cpointer_t lit_cp;
|
||||
|
||||
/** Compressed pointer to an ecma_collection_header_t */
|
||||
mem_cpointer_t collection_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t collection_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
|
||||
/** Compressed pointer to an ecma_number_t */
|
||||
mem_cpointer_t number_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
__extension__ mem_cpointer_t number_cp : ECMA_POINTER_FIELD_WIDTH;
|
||||
|
||||
/** UInt32-represented number placed locally in the descriptor */
|
||||
uint32_t uint32_number;
|
||||
|
||||
@@ -978,7 +978,7 @@ ecma_compare_ecma_strings_longpath (const ecma_string_t *string1_p, /* ecma-stri
|
||||
{
|
||||
case ECMA_STRING_CONTAINER_LIT_TABLE:
|
||||
{
|
||||
JERRY_ASSERT (string1_p->u.lit_cp.packed_value != string2_p->u.lit_cp.packed_value);
|
||||
JERRY_ASSERT (string1_p->u.lit_cp.u.packed_value != string2_p->u.lit_cp.u.packed_value);
|
||||
return false;
|
||||
}
|
||||
case ECMA_STRING_CONTAINER_MAGIC_STRING:
|
||||
|
||||
@@ -1388,7 +1388,7 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
|
||||
for (uint32_t i = const_literal_end; i < literal_end; i++)
|
||||
{
|
||||
mem_cpointer_t bytecode_cpointer = literal_start_p[i].value.base_cp;
|
||||
mem_cpointer_t bytecode_cpointer = literal_start_p[i].u.value.base_cp;
|
||||
ecma_compiled_code_t *bytecode_literal_p = ECMA_GET_NON_NULL_POINTER (ecma_compiled_code_t,
|
||||
bytecode_cpointer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user