From patchwork Wed Aug 23 20:15:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9918269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D27D0602CB for ; Wed, 23 Aug 2017 20:16:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A3728A2C for ; Wed, 23 Aug 2017 20:16:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA68128A2E; Wed, 23 Aug 2017 20:16:31 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 5E67928A2C for ; Wed, 23 Aug 2017 20:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932640AbdHWUQb (ORCPT ); Wed, 23 Aug 2017 16:16:31 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38776 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932443AbdHWUQa (ORCPT ); Wed, 23 Aug 2017 16:16:30 -0400 Received: by mail-wm0-f68.google.com with SMTP id a70so623395wmd.5 for ; Wed, 23 Aug 2017 13:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZzHGOLgaTbilAVIvepLqDnv2Dj8j3ouUxlRNDn1CppU=; b=gaBMDz0ovsAZVjdAwr5rPU9xaMTuFRlERbS+PuHA0tYO4FQ8MAdflHSrWM/4i7Kcgs 7UWaL8ghhiRw47xoeawSR2FaunseTzAf5PzxKfpsJ6UekzQL2liNdPbOm2yhsKTO6rec nrzDcbWisPtxglZyWd8EZdajW5JO+J6grsEFmP0VojdNAYKhw3ibJfZVmfRe/C2oO6zO w5JIgqeDbPtJnj/s4cnj1ICzbcIeJmelmuVGRmj8lPY+KNZ1i+bWhYlO7n5QpLNedD7P 3t7ZTLQO0vKsuQjWuPTG10a7WMQpQFDCKcppIg4x9Ibgg0sDSljvHYR+YbEKP9dowbhA WKRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZzHGOLgaTbilAVIvepLqDnv2Dj8j3ouUxlRNDn1CppU=; b=KyUQsDNTx0Bvm4rbN/olxZTruYfkGxET2MDhBCsWEhBTn2CjIzSvGtrWG1usSl6kGd 9l/0pJih4NU3ugN720bO0imsQmvVikKHTqYcvUpe+Z6NIKy1Vq9u/EQP7kF7CBdWXARr DKN839HxxVueEX9I2O8QBiKqzBB/nUbf9CvCaqsihTIprhd/0uSvO4Hwmw/DsYToIfxq rXcAk7dFKGnTUWzXSXiesenYDYSx9cgtQxVjml+nkE0/cNgxN8Exd50iQNtXbku1r2X4 BwIkilbfgZzH0sfRSJnSoQRzb5kU90AooAOkbsOJ626hDh5GzaV1yI/CDXB6Q6EkxzgD EUEg== X-Gm-Message-State: AHYfb5ieZunoiFOONbDus6Bw/bkmcQUe2MwCk03BH2LonHCVYV6ypFrH j2KecmdsJDcLV/BfNvk= X-Received: by 10.80.224.200 with SMTP id j8mr3927302edl.230.1503519389201; Wed, 23 Aug 2017 13:16:29 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:4076:600:9020:103b:7912:3a40]) by smtp.gmail.com with ESMTPSA id e29sm1183374edd.88.2017.08.23.13.16.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Aug 2017 13:16:28 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Christopher Li , Luc Van Oostenryck Subject: [RFC PATCH 15/48] rename 'struct warning' to 'struct flag' Date: Wed, 23 Aug 2017 22:15:21 +0200 Message-Id: <20170823201554.90551-16-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170823201554.90551-1-luc.vanoostenryck@gmail.com> References: <20170823201554.90551-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'struct warning' can be reused for flags other than warnings. To avoid future confusion, rename it to something more general: 'struct flag' (which in its context, handling of compiler flags, is clear enough). Signed-off-by: Luc Van Oostenryck --- lib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib.c b/lib.c index 73e9a2fe6..f847d1aba 100644 --- a/lib.c +++ b/lib.c @@ -506,7 +506,7 @@ static char **handle_switch_o(char *arg, char **next) return next; } -static const struct warning { +static const struct flag { const char *name; int *flag; } warnings[] = { @@ -551,7 +551,7 @@ enum { }; -static char **handle_onoff_switch(char *arg, char **next, const struct warning warnings[], int n) +static char **handle_onoff_switch(char *arg, char **next, const struct flag warnings[], int n) { int flag = WARNING_ON; char *p = arg + 1; @@ -593,7 +593,7 @@ static char **handle_switch_W(char *arg, char **next) return next; } -static struct warning debugs[] = { +static struct flag debugs[] = { { "entry", &dbg_entry}, { "dead", &dbg_dead}, }; @@ -612,7 +612,7 @@ static char **handle_switch_v(char *arg, char **next) return next; } -static struct warning dumps[] = { +static struct flag dumps[] = { { "D", &dump_macro_defs}, }; @@ -626,7 +626,7 @@ static char **handle_switch_d(char *arg, char **next) } -static void handle_onoff_switch_finalize(const struct warning warnings[], int n) +static void handle_onoff_switch_finalize(const struct flag warnings[], int n) { unsigned i;