From patchwork Tue Nov 20 02:09:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 10689789 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 87F2F13BB for ; Tue, 20 Nov 2018 02:09:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 636522A493 for ; Tue, 20 Nov 2018 02:09:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 572DC2A497; Tue, 20 Nov 2018 02:09:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1936E2A493 for ; Tue, 20 Nov 2018 02:09:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730432AbeKTMgL (ORCPT ); Tue, 20 Nov 2018 07:36:11 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:45066 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726559AbeKTMgL (ORCPT ); Tue, 20 Nov 2018 07:36:11 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1gOvTl-0006Lo-2T; Tue, 20 Nov 2018 10:09:29 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1gOvTi-00022F-57; Tue, 20 Nov 2018 10:09:26 +0800 Date: Tue, 20 Nov 2018 10:09:26 +0800 From: Herbert Xu To: Antonio Ospite Cc: dash@vger.kernel.org Subject: eval: Use sh_warnx instead of warnx Message-ID: <20181120020926.i6hjxecmnpl7oedg@gondor.apana.org.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181119130445.66e3f412d269c553ba5116a3@ao2.it> X-Newsgroups: apana.lists.os.linux.dash Organization: Core User-Agent: NeoMutt/20170113 (1.7.2) Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Antonio Ospite wrote: > > BTW a new warning was introduced by commit 8e43729 (eval: Report I/O > error on stdout, 2018-09-07): > > CC eval.o > eval.c: In function ‘evalbltin’: > eval.c:956:3: warning: implicit declaration of function ‘warnx’; did you mean ‘sh_warnx’? [-Wimplicit-function-declaration] > warnx("%s: I/O error", commandname); > ^~~~~ > sh_warnx Thanks for the heads up. ---8<--- This patch fixes a typo in evalbltin where warnx was used instead of sh_warnx. Reported-by: Antonio Ospite Fixes: 8e43729547b5 ("eval: Report I/O error on stdout") diff --git a/src/eval.c b/src/eval.c index 546ee1b..c27bc35 100644 --- a/src/eval.c +++ b/src/eval.c @@ -953,7 +953,7 @@ evalbltin(const struct builtincmd *cmd, int argc, char **argv, int flags) status = (*cmd->builtin)(argc, argv); flushall(); if (outerr(out1)) - warnx("%s: I/O error", commandname); + sh_warnx("%s: I/O error", commandname); status |= outerr(out1); exitstatus = status; cmddone: