summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2022-05-21 12:15:16 +0200
committerThomas Weißschuh <thomas@t-8ch.de>2022-05-21 12:15:16 +0200
commit0f814783ef9ed3a50e15cab08579218ec45b4640 (patch)
treec13287817c49a35624c65c317068812efedbb42d
parentc6837a4aaeb4b7f6000307aacc04de99d1bae28c (diff)
downloadacpica-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.h2
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)))