diff options
Diffstat (limited to 'source/common')
-rw-r--r-- | source/common/acgetline.c | 2 | ||||
-rw-r--r-- | source/common/adisasm.c | 1 | ||||
-rw-r--r-- | source/common/adwalk.c | 4 | ||||
-rw-r--r-- | source/common/dmtables.c | 4 | ||||
-rw-r--r-- | source/common/dmtbdump1.c | 22 | ||||
-rw-r--r-- | source/common/dmtbdump2.c | 24 | ||||
-rw-r--r-- | source/common/dmtbdump3.c | 6 |
7 files changed, 49 insertions, 14 deletions
diff --git a/source/common/acgetline.c b/source/common/acgetline.c index 702d046b2728..3865914b3f3d 100644 --- a/source/common/acgetline.c +++ b/source/common/acgetline.c @@ -532,7 +532,7 @@ AcpiOsGetLine ( * Ignore the various keys like insert/delete/home/end, etc. * But we must eat the final character of the ESC sequence. */ - InputChar = getchar (); + (void) getchar (); continue; default: diff --git a/source/common/adisasm.c b/source/common/adisasm.c index c73208f68df6..22a850090bf9 100644 --- a/source/common/adisasm.c +++ b/source/common/adisasm.c @@ -746,7 +746,6 @@ AdDoExternalFileList ( { ExternalFileList = ExternalFileList->Next; GlobalStatus = AE_TYPE; - Status = AE_OK; continue; } diff --git a/source/common/adwalk.c b/source/common/adwalk.c index 6da2e8ec944d..1996c965c7a0 100644 --- a/source/common/adwalk.c +++ b/source/common/adwalk.c @@ -601,7 +601,9 @@ AcpiDmFindOrphanDescending ( return (AE_OK); } +#ifdef ACPI_UNDER_DEVELOPMENT OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); +#endif switch (Op->Common.AmlOpcode) { @@ -1100,7 +1102,7 @@ AcpiDmCommonDescendingOp ( /* Switch/Case conversion */ Status = AcpiDmProcessSwitch (Op); - return (AE_OK); + return (Status); } diff --git a/source/common/dmtables.c b/source/common/dmtables.c index a2dbea62a3b8..e5536ecf3979 100644 --- a/source/common/dmtables.c +++ b/source/common/dmtables.c @@ -327,7 +327,7 @@ AdCreateTableHeader ( * makes it easier to rename the disassembled ASL file if needed. */ AcpiOsPrintf ( - "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n", + "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n", Table->Signature, Table->Revision, Table->OemId, Table->OemTableId, Table->OemRevision); } @@ -601,7 +601,7 @@ AdParseTable ( fprintf (stderr, "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n"); - Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot); + (void) AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot); fprintf (stderr, "\n"); /* Process Resource Templates */ diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c index c363ac8d5fad..9061ea11f9aa 100644 --- a/source/common/dmtbdump1.c +++ b/source/common/dmtbdump1.c @@ -474,7 +474,6 @@ AcpiDmDumpCsrt ( { return; } - SubSubOffset += InfoLength; } /* Point to next sub-subtable */ @@ -1401,7 +1400,6 @@ AcpiDmDumpHmat ( while (Offset < Table->Length) { AcpiOsPrintf ("\n"); - SubtableOffset = 0; /* Dump HMAT structure header */ @@ -1484,6 +1482,11 @@ AcpiDmDumpHmat ( Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1a); + if (ACPI_FAILURE (Status)) + { + return; + } + SubtableOffset += 4; } @@ -1500,6 +1503,11 @@ AcpiDmDumpHmat ( Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 4, AcpiDmTableInfoHmat1b); + if (ACPI_FAILURE (Status)) + { + return; + } + SubtableOffset += 4; } @@ -1519,6 +1527,11 @@ AcpiDmDumpHmat ( Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat1c); + if (ACPI_FAILURE(Status)) + { + return; + } + SubtableOffset += 2; } } @@ -1542,6 +1555,11 @@ AcpiDmDumpHmat ( Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset), 2, AcpiDmTableInfoHmat2a); + if (ACPI_FAILURE (Status)) + { + return; + } + SubtableOffset += 2; } break; diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c index 418b6ec0cd15..e350d23cc158 100644 --- a/source/common/dmtbdump2.c +++ b/source/common/dmtbdump2.c @@ -187,6 +187,7 @@ AcpiDmDumpIort ( ACPI_DMTABLE_INFO *InfoTable; char *String; UINT32 i; + UINT32 MappingByteLength; /* Main table */ @@ -314,6 +315,11 @@ AcpiDmDumpIort ( Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 4, AcpiDmTableInfoIort0a); + if (ACPI_FAILURE (Status)) + { + return; + } + NodeOffset += 4; } } @@ -325,8 +331,10 @@ AcpiDmDumpIort ( if (IortNode->Length > NodeOffset) { + MappingByteLength = + IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING); Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, - Table, IortNode->Length - NodeOffset, + Table, IortNode->Length - NodeOffset - MappingByteLength, AcpiDmTableInfoIort1a); if (ACPI_FAILURE (Status)) { @@ -410,7 +418,6 @@ NextSubtable: /* Point to next node subtable */ Offset += IortNode->Length; - IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length); } } @@ -1211,7 +1218,6 @@ AcpiDmDumpNfit ( /* Has a variable number of 32-bit values at the end */ InfoTable = AcpiDmTableInfoNfit2; - Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable); FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE); break; @@ -1236,7 +1242,6 @@ AcpiDmDumpNfit ( /* Has a variable number of 64-bit addresses at the end */ InfoTable = AcpiDmTableInfoNfit6; - Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable); FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64); break; @@ -1273,6 +1278,7 @@ AcpiDmDumpNfit ( { case ACPI_NFIT_TYPE_INTERLEAVE: + Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable); for (i = 0; i < Interleave->LineCount; i++) { Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, @@ -1308,6 +1314,7 @@ AcpiDmDumpNfit ( case ACPI_NFIT_TYPE_FLUSH_ADDRESS: + Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable); for (i = 0; i < Hint->HintCount; i++) { Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, @@ -1806,6 +1813,11 @@ AcpiDmDumpPptt ( Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), 4, AcpiDmTableInfoPptt0a); + if (ACPI_FAILURE (Status)) + { + return; + } + SubtableOffset += 4; } break; @@ -2063,6 +2075,10 @@ AcpiDmDumpSdev ( Status = AcpiDmDumpTable (Table->Length, 0, ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset), VendorDataLength, AcpiDmTableInfoSdev1b); + if (ACPI_FAILURE (Status)) + { + return; + } } break; diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c index 0b9863cce596..561a0032a02d 100644 --- a/source/common/dmtbdump3.c +++ b/source/common/dmtbdump3.c @@ -410,7 +410,7 @@ AcpiDmDumpStao ( Namepath = ACPI_ADD_PTR (char, Table, Offset); StringLength = strlen (Namepath) + 1; - AcpiDmLineHeader (Offset, StringLength, "Namestring"); + AcpiDmLineHeader (Offset, StringLength, "Namepath"); AcpiOsPrintf ("\"%s\"\n", Namepath); /* Point to next namepath */ @@ -526,7 +526,7 @@ AcpiDmDumpTpm2Rev3 ( { case ACPI_TPM23_ACPI_START_METHOD: - Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, + (void) AcpiDmDumpTable (Table->Length, Offset, Subtable, Table->Length - Offset, AcpiDmTableInfoTpm23a); break; @@ -591,7 +591,7 @@ AcpiDmDumpTpm2 ( Offset += sizeof (ACPI_TPM2_TRAILER); AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Table->Length, Offset, ArmSubtable, + (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable, Table->Length - Offset, AcpiDmTableInfoTpm211); break; |