mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove bit_field -> bit_set warning.
The "This 'bit_field' might be better expressed as a 'bit_set' since all of the fields are booleans, of 1-bit in size, and the backing type is an integer" warning is imperfect. Disable it for now.
This commit is contained in:
+2
-3
@@ -1155,8 +1155,7 @@ gb_internal void check_bit_field_type(CheckerContext *ctx, Type *bit_field_type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 // Reconsider at a later date
|
||||||
|
|
||||||
if (bit_sizes.count > 0 && is_type_integer(backing_type)) {
|
if (bit_sizes.count > 0 && is_type_integer(backing_type)) {
|
||||||
bool all_booleans = is_type_boolean(fields[0]->type);
|
bool all_booleans = is_type_boolean(fields[0]->type);
|
||||||
bool all_ones = bit_sizes[0] == 1;
|
bool all_ones = bit_sizes[0] == 1;
|
||||||
@@ -1182,7 +1181,7 @@ gb_internal void check_bit_field_type(CheckerContext *ctx, Type *bit_field_type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bit_field_type->BitField.fields = slice_from_array(fields);
|
bit_field_type->BitField.fields = slice_from_array(fields);
|
||||||
bit_field_type->BitField.bit_sizes = slice_from_array(bit_sizes);
|
bit_field_type->BitField.bit_sizes = slice_from_array(bit_sizes);
|
||||||
|
|||||||
Reference in New Issue
Block a user