Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 2021 11:05:58 GMT
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2556ee3a27af - stable/13 - sh: fix debug build
Message-ID:  <202105051105.145B5wMQ043392@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by pstef:

URL: https://cgit.FreeBSD.org/src/commit/?id=2556ee3a27afa3a8688ed0ef5daaaa9360738f54

commit 2556ee3a27afa3a8688ed0ef5daaaa9360738f54
Author:     Piotr Pawel Stefaniak <pstef@FreeBSD.org>
AuthorDate: 2021-04-11 07:09:28 +0000
Commit:     Piotr Pawel Stefaniak <pstef@FreeBSD.org>
CommitDate: 2021-05-05 11:04:58 +0000

    sh: fix debug build
    
    (cherry picked from commit 1a4e959eb34ae03a96f6d0dea68b6a6a88ac4462)
---
 bin/sh/show.c | 7 +++----
 bin/sh/show.h | 2 ++
 bin/sh/trap.c | 4 ----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/bin/sh/show.c b/bin/sh/show.c
index 04dc123381af..01035d76093d 100644
--- a/bin/sh/show.c
+++ b/bin/sh/show.c
@@ -73,7 +73,7 @@ static void
 shtree(union node *n, int ind, char *pfx, FILE *fp)
 {
 	struct nodelist *lp;
-	char *s;
+	const char *s;
 
 	if (n == NULL)
 		return;
@@ -125,7 +125,7 @@ shcmd(union node *cmd, FILE *fp)
 {
 	union node *np;
 	int first;
-	char *s;
+	const char *s;
 	int dftfd;
 
 	first = 1;
@@ -274,8 +274,7 @@ indent(int amount, char *pfx, FILE *fp)
  */
 
 
-FILE *tracefile;
-
+static FILE *tracefile;
 #if DEBUG >= 2
 int debug = 1;
 #else
diff --git a/bin/sh/show.h b/bin/sh/show.h
index 1dbdaa152b33..790a62e2942c 100644
--- a/bin/sh/show.h
+++ b/bin/sh/show.h
@@ -39,4 +39,6 @@ void trargs(char **);
 void trputc(int);
 void trputs(const char *);
 void opentrace(void);
+
+extern int debug;
 #endif
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index d7a98604c22c..d7ef40274270 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -274,12 +274,8 @@ setsignal(int signo)
 			break;
 		case SIGQUIT:
 #ifdef DEBUG
-			{
-			extern int debug;
-
 			if (debug)
 				break;
-			}
 #endif
 			action = S_CATCH;
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105051105.145B5wMQ043392>