Lint update

date	2005.04.02.00.00.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 15:55:40 +00:00
parent 2334574a09
commit 8b9ee96e62
11 changed files with 77 additions and 45 deletions

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslerror - Error handling and statistics
* $Revision: 1.87 $
* $Revision: 1.88 $
*
*****************************************************************************/
@ -217,7 +217,8 @@ AePrintException (
char *Header)
{
UINT8 SourceByte;
UINT32 Actual;
int Actual;
size_t RActual;
UINT32 MsgLength;
char *MainMessage;
char *ExtraMessage;
@ -283,7 +284,7 @@ AePrintException (
* line, and write it to the output.
*/
Actual = fseek (SourceFile, (long) Enode->LogicalByteOffset,
SEEK_SET);
(int) SEEK_SET);
if (Actual)
{
fprintf (OutputFile,
@ -291,17 +292,17 @@ AePrintException (
}
else
{
Actual = fread (&SourceByte, 1, 1, SourceFile);
if (!Actual)
RActual = fread (&SourceByte, 1, 1, SourceFile);
if (!RActual)
{
fprintf (OutputFile,
"[*** iASL: Read error on source code temp file ***]");
}
else while (Actual && SourceByte && (SourceByte != '\n'))
else while (RActual && SourceByte && (SourceByte != '\n'))
{
fwrite (&SourceByte, 1, 1, OutputFile);
Actual = fread (&SourceByte, 1, 1, SourceFile);
RActual = fread (&SourceByte, 1, 1, SourceFile);
}
}
fprintf (OutputFile, "\n");

View File

@ -3,7 +3,7 @@
/******************************************************************************
*
* Module Name: aslglobal.h - Global variable definitions
* $Revision: 1.33 $
* $Revision: 1.48 $
*
*****************************************************************************/
@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
* All rights reserved.
*
* 2. License
@ -125,6 +125,8 @@
* Global variables. Defined in aslmain.c only, externed in all other files
*/
#undef ASL_EXTERN
#ifdef _DECLARE_GLOBALS
#define ASL_EXTERN
#define ASL_INIT_GLOBAL(a,b) (a)=(b)
@ -137,15 +139,17 @@
/*
* Parser and other externals
*/
extern int yydebug;
extern FILE *AslCompilerin;
extern int AslCompilerdebug;
extern const ASL_MAPPING_ENTRY AslKeywordMapping[];
extern char *AslCompilertext;
extern char hex[];
extern int yydebug;
extern FILE *AslCompilerin;
extern int AslCompilerdebug;
extern const ASL_MAPPING_ENTRY AslKeywordMapping[];
extern char *AslCompilertext;
extern char hex[];
#define ASL_LINE_BUFFER_SIZE 512
#define ASL_MSG_BUFFER_SIZE (ASL_LINE_BUFFER_SIZE * 2)
#define ASL_LINE_BUFFER_SIZE 512
#define ASL_MSG_BUFFER_SIZE (ASL_LINE_BUFFER_SIZE * 2)
#define HEX_TABLE_LINE_SIZE 8
#define HEX_LISTING_LINE_SIZE 16
/* Source code buffers and pointers for error reporting */
@ -162,30 +166,34 @@ ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_LineBufPtr, Gbl_Curren
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_ErrorLog,NULL);
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_NextError,NULL);
extern UINT32 Gbl_ExceptionCount[];
extern UINT32 Gbl_ExceptionCount[];
/* Option flags */
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CheckForAscii, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NsOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmIncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_IncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ListingFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IgnoreErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_GenerateExternals, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_SourceOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ParseOnlyFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CompileTimesFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_FoldConstants, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_VerboseErrors, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisasmFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_GetAllTables, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IntegerOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ReferenceOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayRemarks, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayOptimizations, FALSE);
#define HEX_OUTPUT_NONE 0
#define HEX_OUTPUT_C 1
#define HEX_OUTPUT_ASM 2
@ -220,15 +228,16 @@ ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalFolds, 0);
/* Misc */
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_RevisionOverride, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_TempCount, 0);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*RootNode, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_TableLength, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_SourceLine, 0);
ASL_EXTERN ASL_LISTING_NODE ASL_INIT_GLOBAL (*Gbl_ListingNode, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_NodeCacheNext, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_NodeCacheLast, NULL);
ASL_EXTERN NATIVE_CHAR ASL_INIT_GLOBAL (*Gbl_StringCacheNext, NULL);
ASL_EXTERN NATIVE_CHAR ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_TempCount, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheNext, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT *Gbl_FirstLevelInsertionNode;
@ -253,7 +262,7 @@ ASL_EXTERN ASL_EVENT_INFO AslGbl_Events[21];
/* Scratch buffers */
ASL_EXTERN UINT8 Gbl_AmlBuffer[16];
ASL_EXTERN UINT8 Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE];
ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE];
ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE];
ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE];

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asllisting - Listing file generation
* $Revision: 1.56 $
* $Revision: 1.57 $
*
*****************************************************************************/
@ -1076,7 +1076,7 @@ LsWriteNodeToListing (
/* Pop off this listing node and go back to the parent file */
LsPopNode ();
(void) LsPopNode ();
return;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
* $Revision: 1.67 $
* $Revision: 1.68 $
*
*****************************************************************************/
@ -730,7 +730,7 @@ LdNamespace1End (
"(%s): Popping scope for Op [%s] %p\n",
AcpiUtGetTypeName (ObjectType), Op->Asl.ParseOpName, Op));
AcpiDsScopeStackPop (WalkState);
(void) AcpiDsScopeStackPop (WalkState);
}
return (AE_OK);

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: asllookup- Namespace lookup
* $Revision: 1.92 $
* $Revision: 1.93 $
*
*****************************************************************************/
@ -1165,7 +1165,7 @@ LkNamespaceLocateEnd (
"%s: Popping scope for Op %p\n",
AcpiUtGetTypeName (OpInfo->ObjectType), Op));
AcpiDsScopeStackPop (WalkState);
(void) AcpiDsScopeStackPop (WalkState);
}
return (AE_OK);

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslmain - compiler main and utilities
* $Revision: 1.83 $
* $Revision: 1.84 $
*
*****************************************************************************/
@ -337,7 +337,7 @@ AslCommandLine (
char **argv)
{
BOOLEAN BadCommandLine = FALSE;
ACPI_NATIVE_UINT j;
ACPI_NATIVE_INT j;
/* Minimum command line contains at least one option or an input file */
@ -738,8 +738,12 @@ main (
* If -p not specified, we will use the input filename as the
* output filename prefix
*/
FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
Status = FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
&Gbl_DirectoryPath, &Prefix);
if (ACPI_FAILURE (Status))
{
return -1;
}
if (Gbl_UseDefaultAmlFilename)
{
@ -799,8 +803,12 @@ main (
* If -p not specified, we will use the input filename as the
* output filename prefix
*/
FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
Status = FlSplitInputPathname (Gbl_Files[ASL_FILE_INPUT].Filename,
&Gbl_DirectoryPath, &Prefix);
if (ACPI_FAILURE (Status))
{
return -1;
}
if (Gbl_UseDefaultAmlFilename)
{

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslopcode - AML opcode generation
* $Revision: 1.66 $
* $Revision: 1.67 $
*
*****************************************************************************/
@ -494,7 +494,7 @@ OpcDoEisaId (
/*
* The EISAID string must be exactly 7 characters and of the form
* "LLLXXXX" -- 3 letters and 4 hex digits (e.g., "PNP0001")
* "UUUXXXX" -- 3 uppercase letters and 4 hex digits (e.g., "PNP0001")
*/
if (ACPI_STRLEN (InString) != 7)
{

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asloperands - AML operand processing
* $Revision: 1.51 $
* $Revision: 1.52 $
*
*****************************************************************************/
@ -542,7 +542,7 @@ OpnDoBankField (
*
******************************************************************************/
void
static void
OpnDoRegion (
ACPI_PARSE_OBJECT *Op)
{

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslresource - Resource templates and descriptors
* $Revision: 1.35 $
* $Revision: 1.36 $
*
*****************************************************************************/
@ -185,7 +185,7 @@ RsCreateBitField (
{
Op->Asl.ExternalName = Name;
Op->Asl.Value.Integer = (ByteOffset * 8) + BitOffset;
Op->Asl.Value.Integer = ((ACPI_INTEGER) ByteOffset * 8) + BitOffset;
Op->Asl.CompileFlags |= (NODE_IS_RESOURCE_FIELD | NODE_IS_BIT_OFFSET);
}

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asltransform - Parse tree transforms
* $Revision: 1.33 $
* $Revision: 1.34 $
*
*****************************************************************************/
@ -517,6 +517,10 @@ TrDoSwitch (
{
/* Add an ELSE to complete the previous CASE */
if (!Conditional)
{
return;
}
NewOp = TrCreateLeafNode (PARSEOP_ELSE);
NewOp->Asl.Parent = Conditional->Asl.Parent;
TrAmlInitLineNumbers (NewOp, NewOp->Asl.Parent);
@ -685,6 +689,10 @@ TrDoSwitch (
{
/* Convert the DEFAULT node to an ELSE */
if (!Conditional)
{
return;
}
TrAmlInitNode (DefaultOp, PARSEOP_ELSE);
DefaultOp->Asl.Parent = Conditional->Asl.Parent;
@ -730,12 +738,12 @@ TrDoSwitch (
break;
case ACPI_BTYPE_BUFFER:
TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
(ACPI_INTEGER) 0));
Next = NewOp2->Asl.Next;
TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
(void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
(ACPI_INTEGER) 1));
TrLinkPeerNode (Next->Asl.Child,
(void) TrLinkPeerNode (Next->Asl.Child,
TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (ACPI_INTEGER) 0));
TrAmlSetSubtreeParent (Next->Asl.Child, Next);

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslutils -- compiler utilities
* $Revision: 1.63 $
* $Revision: 1.64 $
*
*****************************************************************************/
@ -133,6 +133,12 @@ extern const char * const yytname[];
/* Local prototypes */
static ACPI_STATUS
UtStrtoul64 (
char *String,
UINT32 Base,
ACPI_INTEGER *RetInteger);
static void
UtPadNameWithUnderscores (
char *NameSeg,
@ -847,7 +853,7 @@ UtDoConstant (
*
******************************************************************************/
ACPI_STATUS
static ACPI_STATUS
UtStrtoul64 (
char *String,
UINT32 Base,