Skip to content

Commit

Permalink
Fix a bunch of warnings for newer GCC versions
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
  • Loading branch information
d-tatianin committed Dec 30, 2024
1 parent a98ac78 commit 47dd107
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion source/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ static uacpi_status handle_create_field(struct execution_context *ctx)
struct op_context *op_ctx = ctx->cur_op_ctx;
uacpi_namespace_node *node;
uacpi_object *obj, *connection_obj = UACPI_NULL;
struct field_specific_data field_data;
struct field_specific_data field_data = { 0 };
uacpi_size i = 1, bit_offset = 0;

uacpi_u8 raw_value, access_type, lock_rule, update_rule;
Expand Down
24 changes: 12 additions & 12 deletions source/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
#define UACPI_REV_VALUE 2
#define UACPI_OS_VALUE "Microsoft Windows NT"

#define MAKE_PREDEFINED(name_str) \
#define MAKE_PREDEFINED(c0, c1, c2, c3) \
{ \
.name.text = name_str, \
.name.text = { c0, c1, c2, c3 }, \
.flags = UACPI_NAMESPACE_NODE_PREDEFINED \
}

static uacpi_namespace_node
predefined_namespaces[UACPI_PREDEFINED_NAMESPACE_MAX + 1] = {
[UACPI_PREDEFINED_NAMESPACE_ROOT] = MAKE_PREDEFINED("\\"),
[UACPI_PREDEFINED_NAMESPACE_GPE] = MAKE_PREDEFINED("_GPE"),
[UACPI_PREDEFINED_NAMESPACE_PR] = MAKE_PREDEFINED("_PR_"),
[UACPI_PREDEFINED_NAMESPACE_SB] = MAKE_PREDEFINED("_SB_"),
[UACPI_PREDEFINED_NAMESPACE_SI] = MAKE_PREDEFINED("_SI_"),
[UACPI_PREDEFINED_NAMESPACE_TZ] = MAKE_PREDEFINED("_TZ_"),
[UACPI_PREDEFINED_NAMESPACE_GL] = MAKE_PREDEFINED("_GL_"),
[UACPI_PREDEFINED_NAMESPACE_OS] = MAKE_PREDEFINED("_OS_"),
[UACPI_PREDEFINED_NAMESPACE_OSI] = MAKE_PREDEFINED("_OSI"),
[UACPI_PREDEFINED_NAMESPACE_REV] = MAKE_PREDEFINED("_REV"),
[UACPI_PREDEFINED_NAMESPACE_ROOT] = MAKE_PREDEFINED('\\', 0, 0, 0),
[UACPI_PREDEFINED_NAMESPACE_GPE] = MAKE_PREDEFINED('_', 'G', 'P', 'E'),
[UACPI_PREDEFINED_NAMESPACE_PR] = MAKE_PREDEFINED('_', 'P', 'R', '_'),
[UACPI_PREDEFINED_NAMESPACE_SB] = MAKE_PREDEFINED('_', 'S', 'B', '_'),
[UACPI_PREDEFINED_NAMESPACE_SI] = MAKE_PREDEFINED('_', 'S', 'I', '_'),
[UACPI_PREDEFINED_NAMESPACE_TZ] = MAKE_PREDEFINED('_', 'T', 'Z', '_'),
[UACPI_PREDEFINED_NAMESPACE_GL] = MAKE_PREDEFINED('_', 'G', 'L', '_'),
[UACPI_PREDEFINED_NAMESPACE_OS] = MAKE_PREDEFINED('_', 'O', 'S', '_'),
[UACPI_PREDEFINED_NAMESPACE_OSI] = MAKE_PREDEFINED('_', 'O', 'S', 'I'),
[UACPI_PREDEFINED_NAMESPACE_REV] = MAKE_PREDEFINED('_', 'R', 'E', 'V'),
};

static struct uacpi_rw_lock namespace_lock;
Expand Down

0 comments on commit 47dd107

Please sign in to comment.