Fix warnings/errors for strict aliasing & function prototypes
This fixes various issues related to gcc's strict-aliasing warning by using unions. It also handles various cases hit with gcc's missing-declarations warning.
This commit is contained in:
parent
0967748fbc
commit
18b637f9dc
11 changed files with 39 additions and 17 deletions
|
|
@ -3175,7 +3175,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
// New built-in variables should use a generic (textually declarable) qualifier in
|
||||
// TStoraregQualifier and only call BuiltInVariable().
|
||||
//
|
||||
void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
static void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
{
|
||||
TSymbol* symbol = symbolTable.find(name);
|
||||
if (symbol) {
|
||||
|
|
@ -3195,7 +3195,7 @@ void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVar
|
|||
//
|
||||
// Safe to call even if name is not present.
|
||||
//
|
||||
void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
{
|
||||
TSymbol* symbol = symbolTable.find(name);
|
||||
if (! symbol)
|
||||
|
|
@ -3212,7 +3212,7 @@ void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& s
|
|||
//
|
||||
// See comments above for other detail.
|
||||
//
|
||||
void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
|
||||
{
|
||||
TSymbol* symbol = symbolTable.find(blockName);
|
||||
if (! symbol)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue