From patchwork Sat Jun 3 07:34:14 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: 9763939 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 5BCA760363 for ; Sat, 3 Jun 2017 07:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D6B3284BD for ; Sat, 3 Jun 2017 07:34:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423AD2849A; Sat, 3 Jun 2017 07:34:32 +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 E510D2849A for ; Sat, 3 Jun 2017 07:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750836AbdFCHeb (ORCPT ); Sat, 3 Jun 2017 03:34:31 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33845 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbdFCHeb (ORCPT ); Sat, 3 Jun 2017 03:34:31 -0400 Received: by mail-wm0-f65.google.com with SMTP id d127so21985291wmf.1 for ; Sat, 03 Jun 2017 00:34: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=0xOHJeUjQkRiHMw406yXmQrUazCkPhLKrDQvFMl/+eI=; b=NJNApQTHaKD1M3Xzi4vg/TppqbtDRTQJt92HZPMQ0qZzYBctd4sFz+G2QIlGK4O35t IYToNMPFm6NhD9E5PiRpSqnWbJkejfQ1dfAe2SMmkTOKd+bOmyc4+sikgRKOuG1pmTmB c/RgEf6fmEfj95cK1rgyXeRxsS6q3+OBfB39dq7+GR1Nz4L6ML688nbCUqwPkKipu1jJ fhgd0B1d5TdhLH8WI5Iq95U5vXJ2xZFPDOQ49dwFGyX4IpoBey0ZpHUA3ml5Y8L0MEfa Y0p2KVkQdsZF7IoGGaGUto1a2d1O2JL08laLL/L9vhs6wIgRy+/Ve+8ojdgaB+jVJ4KA ObiQ== 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=0xOHJeUjQkRiHMw406yXmQrUazCkPhLKrDQvFMl/+eI=; b=KMdC3YCx52YtM7nmm5YlHrQQgbTzri67qlcknGg5xidruhgQGnzelxsGk4Jqf3Qv5p l8eMDLKdqPDcssvQJOwcuZt51WCUTHG91+ahgZiyfThGQaKYL2YTOecrnTFVeOinghbY cHQ+kwC7hy9aS8kIE9E49D50lFX15b5+LYibIHqtCp7BJmBnY9sFShPHNS0NK7WjF1qi 8A1OZ9nvOWAkxTcOfXjEMTKOtdtNs7ZuRTzzeq5oVEEjNH7u/4EmGvpWgwwTpjhZfYmf Qfz0e0Hi3PJIffnGpl16C5XWL4x7KVa8NVMoVBGzJlIBhD9aUEa/h3LlDLgv+pSIWOOj kvVA== X-Gm-Message-State: AODbwcC+4Vy1SjO6MEjc9Lsj5k2PtISeOBAcBjZAW9rB+/kB/EzMhBux m/I9sr69Karf3yX7AxA= X-Received: by 10.80.182.211 with SMTP id f19mr8779649ede.44.1496475269592; Sat, 03 Jun 2017 00:34:29 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:89c:5400:65b4:e9ec:d7a6:723a]) by smtp.gmail.com with ESMTPSA id c47sm11006585ede.32.2017.06.03.00.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Jun 2017 00:34:29 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Chris Li , Luc Van Oostenryck Subject: [PATCH 1/3] rename 'struct warning' to 'struct flag' Date: Sat, 3 Jun 2017 09:34:14 +0200 Message-Id: <20170603073416.66808-2-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170603073416.66808-1-luc.vanoostenryck@gmail.com> References: <20170603073416.66808-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 e1e6a1cbf..569c00e97 100644 --- a/lib.c +++ b/lib.c @@ -488,7 +488,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[] = { @@ -532,7 +532,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; @@ -574,7 +574,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}, }; @@ -593,7 +593,7 @@ static char **handle_switch_v(char *arg, char **next) return next; } -static struct warning dumps[] = { +static struct flag dumps[] = { { "D", &dump_macro_defs}, }; @@ -607,7 +607,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;