diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-05-21 12:15:16 +0200 |
---|---|---|
committer | Thomas Weißschuh <thomas@t-8ch.de> | 2022-05-21 12:15:16 +0200 |
commit | 0f814783ef9ed3a50e15cab08579218ec45b4640 (patch) | |
tree | c13287817c49a35624c65c317068812efedbb42d | |
parent | c6837a4aaeb4b7f6000307aacc04de99d1bae28c (diff) | |
download | acpica-0f814783ef9ed3a50e15cab08579218ec45b4640.tar.gz |
ACPI_CAST_PTR: cast through "void *"
Not all pointer are castable to integers directly and ACPI_UINTPTR_T is
not guaranteed to be "void *".
-rw-r--r-- | source/include/actypes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/include/actypes.h b/source/include/actypes.h index fff6c1659..b7f22172f 100644 --- a/source/include/actypes.h +++ b/source/include/actypes.h @@ -649,7 +649,7 @@ typedef UINT64 ACPI_INTEGER; /* Pointer manipulation */ -#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) +#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (void *) (p)) #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) #define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b))) |