From patchwork Sat Dec 15 17:49:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10732285 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 5940D924 for ; Sat, 15 Dec 2018 17:49:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 499272A20F for ; Sat, 15 Dec 2018 17:49:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D84E288B3; Sat, 15 Dec 2018 17:49:40 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 B1B652A224 for ; Sat, 15 Dec 2018 17:49:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbeLORtj (ORCPT ); Sat, 15 Dec 2018 12:49:39 -0500 Received: from mail.ao2.it ([92.243.12.208]:37565 "EHLO ao2.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727216AbeLORtj (ORCPT ); Sat, 15 Dec 2018 12:49:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ao2.it; s=20180927; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=AMWnZoBaVcXZXpP8MWV/eOIhZ3F45sL8jfpqBxOvXDw=; b=ee18nTgLSNIY/7yw70xo8up8XnkC6XKxNE93C0m2+KbriUaaSdl0fvTLVaDCO4nzDPdkJKfJw37/QvUHByU7S7LLxD3T6jRI7w3jIDvf/traWEnAWgHWazE4TGb2g45Ls99dD5hrA5zpXG+BPtV+hWOJ60nYd7Y8l1jkMgvEW54nUfNS7kiZ2saeVKysyn8Ymbor9IEbmIYjcqlRf/7VmuNPfdFgVLrs+9wnOZiVOgj90Xah87dym4UKwlehKlG/V/GwAzA4P65S7n2Q73U+MWxA48tvzkdEGOC2AGcRT9gggMvNwsiE/M6KVQRzghwvDkFo4ldmahATfqQnWlgmIQ==; Received: from localhost ([::1] helo=jcn) by ao2.it with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1gYE3S-00017g-MR; Sat, 15 Dec 2018 18:48:46 +0100 Received: from ao2 by jcn with local (Exim 4.91) (envelope-from ) id 1gYE4E-00032V-Kw; Sat, 15 Dec 2018 18:49:34 +0100 From: Antonio Ospite To: dash@vger.kernel.org Cc: Antonio Ospite Subject: [PATCH 2/2] Fix clang warnings about GNU old-style field designator Date: Sat, 15 Dec 2018 18:49:32 +0100 Message-Id: <20181215174932.11635-3-ao2@ao2.it> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181215174932.11635-1-ao2@ao2.it> References: <20181215174932.11635-1-ao2@ao2.it> MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building with clang results in some warnings about the use of GNU old-style field designators: ----------------------------------------------------------------------- output.c:86:2: warning: use of GNU old-style field designator extension [-Wgnu-designator] nextc: 0, end: 0, buf: 0, bufsize: OUTBUFSIZ, fd: 1, flags: 0 ^~~~~~ .nextc = ... ----------------------------------------------------------------------- Fix the issue bu using C99 initializers instead. This should be safe and should not introduce any compatibility problems as it is done already in other parts of the codebase, like src/expand.c:ccmatch() and src/parser.c::readtoken1(). Signed-off-by: Antonio Ospite --- src/output.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/output.c b/src/output.c index 34243ea..e9ee9b4 100644 --- a/src/output.c +++ b/src/output.c @@ -71,27 +71,27 @@ #ifdef USE_GLIBC_STDIO struct output output = { - stream: 0, nextc: 0, end: 0, buf: 0, bufsize: 0, fd: 1, flags: 0 + .stream = 0, .nextc = 0, .end = 0, .buf = 0, .bufsize = 0, .fd = 1, .flags = 0 }; struct output errout = { - stream: 0, nextc: 0, end: 0, buf: 0, bufsize: 0, fd: 2, flags: 0 + .stream = 0, .nextc = 0, .end = 0, .buf = 0, .bufsize = 0, .fd = 2, .flags = 0 } #ifdef notyet struct output memout = { - stream: 0, nextc: 0, end: 0, buf: 0, bufsize: 0, fd: MEM_OUT, flags: 0 + .stream = 0, .nextc = 0, .end = 0, .buf = 0, .bufsize = 0, .fd = MEM_OUT, .flags = 0 }; #endif #else struct output output = { - nextc: 0, end: 0, buf: 0, bufsize: OUTBUFSIZ, fd: 1, flags: 0 + .nextc = 0, .end = 0, .buf = 0, .bufsize = OUTBUFSIZ, .fd = 1, .flags = 0 }; struct output errout = { - nextc: 0, end: 0, buf: 0, bufsize: 0, fd: 2, flags: 0 + .nextc = 0, .end = 0, .buf = 0, .bufsize = 0, .fd = 2, .flags = 0 }; struct output preverrout; #ifdef notyet struct output memout = { - nextc: 0, end: 0, buf: 0, bufsize: 0, fd: MEM_OUT, flags: 0 + .nextc = 0, .end = 0, .buf = 0, .bufsize = 0, .fd = MEM_OUT, .flags = 0 }; #endif #endif