From owner-svn-src-head@FreeBSD.ORG Sun Mar 1 21:46:57 2015 Return-Path: Delivered-To: svn-src-head@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 B9FEFF78; Sun, 1 Mar 2015 21:46:57 +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 A393D9CF; Sun, 1 Mar 2015 21:46:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21LkvJt095612; Sun, 1 Mar 2015 21:46:57 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21LktwP095601; Sun, 1 Mar 2015 21:46:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503012146.t21LktwP095601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 1 Mar 2015 21:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279503 - in head: bin/kill bin/sh bin/sh/bltin usr.bin/printf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 21:46:57 -0000 Author: jilles Date: Sun Mar 1 21:46:55 2015 New Revision: 279503 URL: https://svnweb.freebsd.org/changeset/base/279503 Log: sh: Fix compiler warnings related to duplicate or missing declarations. Modified: head/bin/kill/kill.c head/bin/sh/arith_yacc.h head/bin/sh/arith_yylex.c head/bin/sh/bltin/bltin.h head/bin/sh/mktokens head/bin/sh/options.h head/usr.bin/printf/printf.c Modified: head/bin/kill/kill.c ============================================================================== --- head/bin/kill/kill.c Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/kill/kill.c Sun Mar 1 21:46:55 2015 (r279503) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #ifdef SHELL #define main killcmd #include "bltin/bltin.h" -#include "error.h" #endif static void nosig(const char *); Modified: head/bin/sh/arith_yacc.h ============================================================================== --- head/bin/sh/arith_yacc.h Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/sh/arith_yacc.h Sun Mar 1 21:46:55 2015 (r279503) @@ -81,6 +81,8 @@ #define ARITH_QMARK 37 #define ARITH_COLON 38 +extern const char *arith_buf; + union yystype { arith_t val; char *name; Modified: head/bin/sh/arith_yylex.c ============================================================================== --- head/bin/sh/arith_yylex.c Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/sh/arith_yylex.c Sun Mar 1 21:46:55 2015 (r279503) @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif -extern const char *arith_buf; - int yylex(void) { Modified: head/bin/sh/bltin/bltin.h ============================================================================== --- head/bin/sh/bltin/bltin.h Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/sh/bltin/bltin.h Sun Mar 1 21:46:55 2015 (r279503) @@ -42,6 +42,7 @@ #include "../shell.h" #include "../mystring.h" #ifdef SHELL +#include "../error.h" #include "../output.h" #include "builtins.h" #define FILE struct output @@ -73,7 +74,6 @@ #include pointer stalloc(int); -void error(const char *, ...) __printf0like(1, 2); int killjob(const char *, int); extern char *commandname; Modified: head/bin/sh/mktokens ============================================================================== --- head/bin/sh/mktokens Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/sh/mktokens Sun Mar 1 21:46:55 2015 (r279503) @@ -74,11 +74,11 @@ exec > token.h awk '{print "#define " $1 " " NR-1}' $temp echo ' /* Array indicating which tokens mark the end of a list */ -const char tokendlist[] = {' +static const char tokendlist[] = {' awk '{print "\t" $2 ","}' $temp echo '}; -const char *const tokname[] = {' +static const char *const tokname[] = {' sed -e 's/"/\\"/g' \ -e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \ $temp Modified: head/bin/sh/options.h ============================================================================== --- head/bin/sh/options.h Sun Mar 1 21:41:37 2015 (r279502) +++ head/bin/sh/options.h Sun Mar 1 21:46:55 2015 (r279503) @@ -73,6 +73,7 @@ struct optent { char val; }; +extern struct optent optlist[NOPTS]; #ifdef DEFINE_OPTIONS struct optent optlist[NOPTS] = { { "errexit", 'e', 0 }, @@ -95,8 +96,6 @@ struct optent optlist[NOPTS] = { { "physical", 'P', 0 }, { "trackall", 'h', 0 }, }; -#else -extern struct optent optlist[NOPTS]; #endif Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Sun Mar 1 21:41:37 2015 (r279502) +++ head/usr.bin/printf/printf.c Sun Mar 1 21:46:55 2015 (r279503) @@ -66,7 +66,6 @@ static const char rcsid[] = #ifdef SHELL #define main printfcmd #include "bltin/bltin.h" -#include "error.h" #include "options.h" #endif