From owner-svn-src-all@FreeBSD.ORG Tue Mar 3 21:21:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B5FF537; Tue, 3 Mar 2015 21:21:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BCA4CAF; Tue, 3 Mar 2015 21:21:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t23LLilf004671; Tue, 3 Mar 2015 21:21:44 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t23LLhlq004666; Tue, 3 Mar 2015 21:21:43 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503032121.t23LLhlq004666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 3 Mar 2015 21:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279569 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 21:21:45 -0000 Author: jilles Date: Tue Mar 3 21:21:43 2015 New Revision: 279569 URL: https://svnweb.freebsd.org/changeset/base/279569 Log: sh: Fix more compiler warnings related to variable declarations. Modified: head/bin/sh/error.c head/bin/sh/mknodes.c head/bin/sh/mksyntax.c head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/error.c ============================================================================== --- head/bin/sh/error.c Tue Mar 3 20:23:59 2015 (r279568) +++ head/bin/sh/error.c Tue Mar 3 21:21:43 2015 (r279569) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); */ #include "shell.h" +#include "eval.h" #include "main.h" #include "options.h" #include "output.h" @@ -64,7 +65,6 @@ struct jmploc *handler; volatile sig_atomic_t exception; volatile sig_atomic_t suppressint; volatile sig_atomic_t intpending; -char *commandname; static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2; Modified: head/bin/sh/mknodes.c ============================================================================== --- head/bin/sh/mknodes.c Tue Mar 3 20:23:59 2015 (r279568) +++ head/bin/sh/mknodes.c Tue Mar 3 21:21:43 2015 (r279569) @@ -204,7 +204,7 @@ parsefield(void) } -char writer[] = "\ +static const char writer[] = "\ /*\n\ * This file was generated by the mknodes program.\n\ */\n\ Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Tue Mar 3 20:23:59 2015 (r279568) +++ head/bin/sh/mksyntax.c Tue Mar 3 21:21:43 2015 (r279569) @@ -60,7 +60,7 @@ struct synclass { }; /* Syntax classes */ -struct synclass synclass[] = { +static const struct synclass synclass[] = { { "CWORD", "character is nothing special" }, { "CNL", "newline character" }, { "CBACK", "a backslash character" }, @@ -85,7 +85,7 @@ struct synclass synclass[] = { * Syntax classes for is_ functions. Warning: if you add new classes * you may have to change the definition of the is_in_name macro. */ -struct synclass is_entry[] = { +static const struct synclass is_entry[] = { { "ISDIGIT", "a digit" }, { "ISUPPER", "an upper case letter" }, { "ISLOWER", "a lower case letter" }, @@ -94,7 +94,7 @@ struct synclass is_entry[] = { { NULL, NULL } }; -static char writer[] = "\ +static const char writer[] = "\ /*\n\ * This file was generated by the mksyntax program.\n\ */\n\ Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Tue Mar 3 20:23:59 2015 (r279568) +++ head/bin/sh/var.c Tue Mar 3 21:21:43 2015 (r279569) @@ -94,6 +94,7 @@ struct var vps4; static struct var voptind; struct var vdisvfork; +struct localvar *localvars; int forcelocal; static const struct varinit varinit[] = { Modified: head/bin/sh/var.h ============================================================================== --- head/bin/sh/var.h Tue Mar 3 20:23:59 2015 (r279568) +++ head/bin/sh/var.h Tue Mar 3 21:21:43 2015 (r279569) @@ -68,7 +68,7 @@ struct localvar { }; -struct localvar *localvars; +extern struct localvar *localvars; extern int forcelocal; extern struct var vifs;