commit 50b60a65075cc74836becee050eb87f11642da75
parent 1b2bcd0b455e35c6792bb1ce19859288e696a00a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 17 Jul 2015 21:27:55 +0200
remove unused endif() function and unused variables
Diffstat:
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/cc1/cpp.c b/cc1/cpp.c
@@ -19,7 +19,6 @@ static char *argp, *macroname;
static unsigned arglen;
static Symbol *symline, *symfile;
static unsigned char ifstatus[NR_COND];
-static Type *charptype;
unsigned cppctx;
int disexpand;
@@ -405,7 +404,6 @@ too_long:
static void
line(void)
{
- char *file, *p;
Type *tp;
long n;
@@ -479,20 +477,8 @@ ifndef(void)
}
static void
-endif(void)
-{
- if (cppctx == 0)
- error("#endif without #if");
-
- if (!ifstatus[--cppctx])
- --cppoff;
-}
-
-static void
elseclause(void)
{
- struct ifstatus *ip;
-
if (cppctx == 0)
error("#else without #ifdef/ifndef");
diff --git a/cc2/cgen.c b/cc2/cgen.c
@@ -207,8 +207,6 @@ moveto(Node *np, uint8_t reg)
static void
accum(Node *np)
{
- Symbol *sym;
-
switch (np->type.size) {
case 1:
moveto(np, A);
diff --git a/cc2/parser.c b/cc2/parser.c
@@ -278,7 +278,7 @@ gettype(char *type)
case L_UINT64:
return &l_uint64;
case L_FUNCTION:
- return &Funct;;
+ return &Funct;
default:
error(ETYPERR);
}
@@ -423,7 +423,6 @@ cast(char *token)
static void
expr(char *token)
{
- Node *np;
void (*fun)(char *);
unsigned c;
@@ -438,8 +437,6 @@ static void
expression(char *token)
{
Node *np;
- void (*fun)(char *);
- unsigned c;
if (!curfun)
error(ESYNTAX);