mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Fix warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c7e30347d
commit
4170123278
@ -688,14 +688,14 @@ makeRuleDescArray2()
|
||||
fprintf(outfile, "\t");
|
||||
if (pVector[i]) {
|
||||
Operator o;
|
||||
NonTerminal t;
|
||||
NonTerminal t1, t2;
|
||||
|
||||
fprintf(outfile, "{");
|
||||
fprintf(outfile, "%5d, %5d, %5d, %5d",
|
||||
pVector[i]->rule->lhs->num,
|
||||
(o = pVector[i]->rule->pat->op) ? o->num : 0,
|
||||
(t = pVector[i]->rule->pat->children[0]) ? t->num : 0,
|
||||
(t = pVector[i]->rule->pat->children[1]) ? t->num : 0
|
||||
(t1 = pVector[i]->rule->pat->children[0]) ? t1->num : 0,
|
||||
(t2 = pVector[i]->rule->pat->children[1]) ? t2->num : 0
|
||||
);
|
||||
fprintf(outfile, "} /* ");
|
||||
printRule(pVector[i], "0");
|
||||
|
@ -58,6 +58,11 @@ struct strTable {
|
||||
};
|
||||
typedef struct strTable *StrTable;
|
||||
|
||||
extern void doGrammarNts ARGS((void));
|
||||
void makeRuleDescArray ARGS((void));
|
||||
void makeDeltaCostArray ARGS((void));
|
||||
void makeStateStringArray ARGS((void));
|
||||
|
||||
extern StrTable newStrTable ARGS((void));
|
||||
extern StrTableElement addString ARGS((StrTable, char *, int, int *));
|
||||
|
||||
|
@ -15,9 +15,9 @@ static char *outFileName;
|
||||
|
||||
static char version[] = "BURG, Version 1.0";
|
||||
|
||||
extern void main ARGS((int argc, char **argv));
|
||||
extern int main ARGS((int argc, char **argv));
|
||||
|
||||
void
|
||||
int
|
||||
main(argc, argv) int argc; char **argv;
|
||||
{
|
||||
int i;
|
||||
@ -33,7 +33,7 @@ main(argc, argv) int argc; char **argv;
|
||||
fprintf(stderr, "%s\n", version);
|
||||
break;
|
||||
case 'p':
|
||||
needStr = &prefix;
|
||||
needStr = (char**)&prefix;
|
||||
break;
|
||||
case 'o':
|
||||
needStr = &outFileName;
|
||||
|
@ -232,7 +232,7 @@ renumber()
|
||||
for (i = 1; i < globalMap->count; i++) {
|
||||
sortedStates[i-1] = globalMap->set[i];
|
||||
}
|
||||
qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), stateCompare);
|
||||
qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), (int(*)(const void *, const void *))stateCompare);
|
||||
previousOp = 0;
|
||||
for (i = 0; i < globalMap->count-1; i++) {
|
||||
sortedStates[i]->newNum = i;
|
||||
@ -246,7 +246,7 @@ renumber()
|
||||
sortedRules = (RuleAST*) zalloc(max_ruleAST * sizeof(RuleAST));
|
||||
count = 0;
|
||||
foreachList((ListFn) assignRules, ruleASTs);
|
||||
qsort(sortedRules, max_ruleAST, sizeof(RuleAST), ruleCompare);
|
||||
qsort(sortedRules, max_ruleAST, sizeof(RuleAST), (int(*)(const void *, const void *))ruleCompare);
|
||||
previousLHS = 0;
|
||||
base_counter = 0;
|
||||
for (i = 0; i < max_ruleAST; i++) {
|
||||
|
@ -688,14 +688,14 @@ makeRuleDescArray2()
|
||||
fprintf(outfile, "\t");
|
||||
if (pVector[i]) {
|
||||
Operator o;
|
||||
NonTerminal t;
|
||||
NonTerminal t1, t2;
|
||||
|
||||
fprintf(outfile, "{");
|
||||
fprintf(outfile, "%5d, %5d, %5d, %5d",
|
||||
pVector[i]->rule->lhs->num,
|
||||
(o = pVector[i]->rule->pat->op) ? o->num : 0,
|
||||
(t = pVector[i]->rule->pat->children[0]) ? t->num : 0,
|
||||
(t = pVector[i]->rule->pat->children[1]) ? t->num : 0
|
||||
(t1 = pVector[i]->rule->pat->children[0]) ? t1->num : 0,
|
||||
(t2 = pVector[i]->rule->pat->children[1]) ? t2->num : 0
|
||||
);
|
||||
fprintf(outfile, "} /* ");
|
||||
printRule(pVector[i], "0");
|
||||
|
@ -58,6 +58,11 @@ struct strTable {
|
||||
};
|
||||
typedef struct strTable *StrTable;
|
||||
|
||||
extern void doGrammarNts ARGS((void));
|
||||
void makeRuleDescArray ARGS((void));
|
||||
void makeDeltaCostArray ARGS((void));
|
||||
void makeStateStringArray ARGS((void));
|
||||
|
||||
extern StrTable newStrTable ARGS((void));
|
||||
extern StrTableElement addString ARGS((StrTable, char *, int, int *));
|
||||
|
||||
|
@ -15,9 +15,9 @@ static char *outFileName;
|
||||
|
||||
static char version[] = "BURG, Version 1.0";
|
||||
|
||||
extern void main ARGS((int argc, char **argv));
|
||||
extern int main ARGS((int argc, char **argv));
|
||||
|
||||
void
|
||||
int
|
||||
main(argc, argv) int argc; char **argv;
|
||||
{
|
||||
int i;
|
||||
@ -33,7 +33,7 @@ main(argc, argv) int argc; char **argv;
|
||||
fprintf(stderr, "%s\n", version);
|
||||
break;
|
||||
case 'p':
|
||||
needStr = &prefix;
|
||||
needStr = (char**)&prefix;
|
||||
break;
|
||||
case 'o':
|
||||
needStr = &outFileName;
|
||||
|
@ -232,7 +232,7 @@ renumber()
|
||||
for (i = 1; i < globalMap->count; i++) {
|
||||
sortedStates[i-1] = globalMap->set[i];
|
||||
}
|
||||
qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), stateCompare);
|
||||
qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), (int(*)(const void *, const void *))stateCompare);
|
||||
previousOp = 0;
|
||||
for (i = 0; i < globalMap->count-1; i++) {
|
||||
sortedStates[i]->newNum = i;
|
||||
@ -246,7 +246,7 @@ renumber()
|
||||
sortedRules = (RuleAST*) zalloc(max_ruleAST * sizeof(RuleAST));
|
||||
count = 0;
|
||||
foreachList((ListFn) assignRules, ruleASTs);
|
||||
qsort(sortedRules, max_ruleAST, sizeof(RuleAST), ruleCompare);
|
||||
qsort(sortedRules, max_ruleAST, sizeof(RuleAST), (int(*)(const void *, const void *))ruleCompare);
|
||||
previousLHS = 0;
|
||||
base_counter = 0;
|
||||
for (i = 0; i < max_ruleAST; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user