sh: fix debug build

Approved by:	jilles
This commit is contained in:
Piotr Pawel Stefaniak 2021-04-11 09:09:28 +02:00
parent b77f5f5553
commit 1a4e959eb3
3 changed files with 5 additions and 8 deletions

View File

@ -73,7 +73,7 @@ static void
shtree(union node *n, int ind, char *pfx, FILE *fp) shtree(union node *n, int ind, char *pfx, FILE *fp)
{ {
struct nodelist *lp; struct nodelist *lp;
char *s; const char *s;
if (n == NULL) if (n == NULL)
return; return;
@ -125,7 +125,7 @@ shcmd(union node *cmd, FILE *fp)
{ {
union node *np; union node *np;
int first; int first;
char *s; const char *s;
int dftfd; int dftfd;
first = 1; first = 1;
@ -274,8 +274,7 @@ indent(int amount, char *pfx, FILE *fp)
*/ */
FILE *tracefile; static FILE *tracefile;
#if DEBUG >= 2 #if DEBUG >= 2
int debug = 1; int debug = 1;
#else #else

View File

@ -39,4 +39,6 @@ void trargs(char **);
void trputc(int); void trputc(int);
void trputs(const char *); void trputs(const char *);
void opentrace(void); void opentrace(void);
extern int debug;
#endif #endif

View File

@ -274,12 +274,8 @@ setsignal(int signo)
break; break;
case SIGQUIT: case SIGQUIT:
#ifdef DEBUG #ifdef DEBUG
{
extern int debug;
if (debug) if (debug)
break; break;
}
#endif #endif
action = S_CATCH; action = S_CATCH;
break; break;