[hackers] [scc] remove unused endif() function and unused variables || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Fri, 17 Jul 2015 23:03:08 +0200 (CEST)

commit 50b60a65075cc74836becee050eb87f11642da75
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri Jul 17 21:27:55 2015 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri Jul 17 22:34:51 2015 +0200

    remove unused endif() function and unused variables

diff --git a/cc1/cpp.c b/cc1/cpp.c
index e8894f0..a81b5cc 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -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;
_AT_@ -405,7 +404,6 @@ too_long:
 static void
 line(void)
 {
- char *file, *p;
         Type *tp;
         long n;
 
_AT_@ -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
index be4ff41..d65721a 100644
--- a/cc2/cgen.c
+++ b/cc2/cgen.c
_AT_@ -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
index 99f9d8d..29b4770 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -278,7 +278,7 @@ gettype(char *type)
         case L_UINT64:
                 return &l_uint64;
         case L_FUNCTION:
- return &Funct;;
+ return &Funct;
         default:
                 error(ETYPERR);
         }
_AT_@ -423,7 +423,6 @@ cast(char *token)
 static void
 expr(char *token)
 {
- Node *np;
         void (*fun)(char *);
         unsigned c;
 
_AT_@ -438,8 +437,6 @@ static void
 expression(char *token)
 {
         Node *np;
- void (*fun)(char *);
- unsigned c;
 
         if (!curfun)
                 error(ESYNTAX);
Received on Fri Jul 17 2015 - 23:03:08 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 17 2015 - 23:12:18 CEST