iASL: Remove extraneous error message if no parse tree created.

If early errors happen during the parsing stage, a parse tree
may not be created. An "internal" error was emitted. Add a check
for actual errors so that the internal error is only emitted
if no other errors were generated during the parse.
This commit is contained in:
Robert Moore 2012-03-30 10:14:26 -07:00
parent e18caf1881
commit 4817fab2d8
3 changed files with 17 additions and 7 deletions

View File

@ -559,8 +559,17 @@ CmDoCompile (
if (!RootNode)
{
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
NULL, "- Could not resolve parse tree root node");
/*
* If there are no errors, then we have some sort of
* internal problem.
*/
Status = AslCheckForErrorExit ();
if (Status == AE_OK)
{
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
NULL, "- Could not resolve parse tree root node");
}
goto ErrorExit;
}

View File

@ -208,6 +208,11 @@ ACPI_STATUS
AslDoOneFile (
char *Filename);
ACPI_STATUS
AslCheckForErrorExit (
void);
/*
* aslcompile - compile mainline
*/

View File

@ -139,10 +139,6 @@ static UINT8
AslDetectSourceFileType (
ASL_FILE_INFO *Info);
static ACPI_STATUS
AslCheckForErrorExit (
void);
/*******************************************************************************
*
@ -630,7 +626,7 @@ AslDoOnePathname (
*
******************************************************************************/
static ACPI_STATUS
ACPI_STATUS
AslCheckForErrorExit (
void)
{