From 72805936603fcf84e98f1b89bf99b5101af27fb8 Mon Sep 17 00:00:00 2001 From: Sven Barth Date: Mon, 10 Feb 2020 14:40:49 +0100 Subject: [PATCH 1/3] * cast the result of the pointer difference to UINT32; altnatively we could declare AmlLength as ACPI_SIZE, but then one would need to cast at the assignment for MethodObj->Method.AmlLength --- source/components/namespace/nsxfname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 5b3d5a9be..53a2f4bfa 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -714,7 +714,7 @@ AcpiInstallMethod ( MethodFlags = *ParserState.Aml++; AmlStart = ParserState.Aml; - AmlLength = ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart); + AmlLength = (UINT32) ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart); /* * Allocate resources up-front. We don't want to have to delete a new From d216e4c8d886d7fb82697948c4fee8a5777a1a5a Mon Sep 17 00:00:00 2001 From: Sven Barth Date: Mon, 10 Feb 2020 14:43:34 +0100 Subject: [PATCH 2/3] * AcpiNsBuildNormalizedPath() takes an UINT32 as length argument, so cast accordingly --- source/components/namespace/nsnames.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index eebdd1a2d..c08f76449 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -336,7 +336,7 @@ AcpiNsHandleToPathname ( /* Build the path in the caller buffer */ (void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer, - RequiredSize, NoTrailing); + (UINT32) RequiredSize, NoTrailing); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n", (char *) Buffer->Pointer, (UINT32) RequiredSize)); @@ -509,7 +509,7 @@ AcpiNsGetNormalizedPathname ( /* Build the path in the allocated buffer */ - (void) AcpiNsBuildNormalizedPath (Node, NameBuffer, Size, NoTrailing); + (void) AcpiNsBuildNormalizedPath (Node, NameBuffer, (UINT32) Size, NoTrailing); ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%s: Path \"%s\"\n", ACPI_GET_FUNCTION_NAME, NameBuffer)); From 0f64c317e769a63679442404421da1d5bd61068a Mon Sep 17 00:00:00 2001 From: Sven Barth Date: Mon, 10 Feb 2020 14:45:37 +0100 Subject: [PATCH 3/3] * strlen() returns a size_t, so use ACPI_SIZE instead of UINT32 for PrefixPathLength --- source/components/namespace/nsnames.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index c08f76449..a9509195c 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -542,7 +542,7 @@ AcpiNsBuildPrefixedPathname ( char *FullPath = NULL; char *ExternalPath = NULL; char *PrefixPath = NULL; - UINT32 PrefixPathLength = 0; + ACPI_SIZE PrefixPathLength = 0; /* If there is a prefix, get the pathname to it */