From patchwork Mon Apr 9 23:42:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Pabalinas X-Patchwork-Id: 10332131 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 C936F6037F for ; Mon, 9 Apr 2018 23:42:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8A0828C67 for ; Mon, 9 Apr 2018 23:42:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD1ED28C69; Mon, 9 Apr 2018 23:42:29 +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=-5.4 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID,T_TVD_MIME_EPI 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 217BD28C67 for ; Mon, 9 Apr 2018 23:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270AbeDIXm2 (ORCPT ); Mon, 9 Apr 2018 19:42:28 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:45531 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759AbeDIXm2 (ORCPT ); Mon, 9 Apr 2018 19:42:28 -0400 Received: by mail-pf0-f193.google.com with SMTP id l27so6689323pfk.12 for ; Mon, 09 Apr 2018 16:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=BO+Z47XAjO8trUs9U7+Q2q6TT/Q5CKoPdHa8eEd9ut8=; b=jweyhIpuR3pCG08QM8UayW+8tUOs0mVuRhmAwYqs0fSP1Jg8eRP/zkoypYeOA74C2e 2FjCwta/Rjw3/QCTUlFlwGL+Ne1kPMawd3Slcyi+oBgvs0jK/klhnjEhvc8NbYvwH62F to5WlYKUzNTMRCK4X9z6mgLPq4wDzYsIW/rOmndZGJphnlSy/l0NSNoTuS6mxD7hbwZM JK7LWSlZ2Lag59NkFu9vmVgEiUVIt7/HlU+HcoXJGdDI4//ZDIg+5W+wHBzl8DAxDoB5 HR8Uld0QVm+sCvJWer3w8CVy/JLtJIz3eYvDvQ1DbXH9AEr52mMlqxPMvwn8sjl5lQOu QxpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=BO+Z47XAjO8trUs9U7+Q2q6TT/Q5CKoPdHa8eEd9ut8=; b=EqsgMV35PGaA19+iy5+4NlsOBvADybmX8NAJ+/ntEOY9dHmqdH6bJSc5VIifNzG/w/ rozeBv8xiT8y/egyYgOH2FclyQ+B+/WXJdrIZbkwjyAoSaiVVfRNQpbK//+rbzhSHzay KBsE7tEnxamnd0BJBhrOP15a8dtjCUxBp/653S2VYIVq4Bxa2zaZAdA1vs3MoW6Xlk9K ZShLpdICF9liRbNTwo/7xJHVnZ/Pu28uKLbTPS088hjD56hW5O1l0oESE/oJXrKjmUIy 5bGrb0viWAC5P///n9Xleqm0rL6IRAvQvpBKyhEcbSE1mX6vj+gDjOU2GEZtV3hta3Xb tC9w== X-Gm-Message-State: AElRT7GnXjEWW7gVb6dtNpBImEyt4BL6otDaFnqmYzZD4FuJtAkBxjvL XT5S3982phSLktWsE63AfjbY6Q== X-Google-Smtp-Source: AIpwx4+11V18N4wyxmdEiZCntqB/LvOYdgNpuvSERFcTfD+lo4jbJtnQGQhi1An+uFR3BRij4vqO+w== X-Received: by 10.99.109.72 with SMTP id i69mr27015497pgc.417.1523317347297; Mon, 09 Apr 2018 16:42:27 -0700 (PDT) Received: from gmail.com (cpe-98-150-136-16.hawaii.res.rr.com. [98.150.136.16]) by smtp.gmail.com with ESMTPSA id l19sm404610pgc.77.2018.04.09.16.42.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 16:42:26 -0700 (PDT) Date: Mon, 9 Apr 2018 13:42:14 -1000 From: Joey Pabalinas To: linux-sparse@vger.kernel.org Cc: Al Viro , Christopher Li , Joey Pabalinas , Luc Van Oostenryck Subject: [PATCH V3] doc: copy-edit text related to applying sizeof to a _Bool Message-ID: <20180409234214.r6fidbi3thjnb4nn@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180323-62-378db9 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 Clean up the grammar/capitalization of the -Wsizeof-bool sections and italicize the size (1) so that it is consistent with the surrounding text. CC: Al Viro CC: Christopher Li CC: Joey Pabalinas CC: Luc Van Oostenryck Signed-off-by: Joey Pabalinas Signed-off-by: Luc Van Oostenryck evaluate.c | 2 +- sparse.1 | 2 +- validation/sizeof-bool.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Acked-by: Luc Van Oostenryck diff --git a/evaluate.c b/evaluate.c index 4e1dffe9c5416380df..9ee47c611958c7e8bf 100644 --- a/evaluate.c +++ b/evaluate.c @@ -2199,7 +2199,7 @@ static struct symbol *evaluate_sizeof(struct expression *expr) if (size == 1 && is_bool_type(type)) { if (Wsizeof_bool) - warning(expr->pos, "expression using sizeof bool"); + warning(expr->pos, "expression using sizeof _Bool"); size = bits_in_char; } diff --git a/sparse.1 b/sparse.1 index 88343f3170f195297a..70f1f55a76e0cbbb2a 100644 --- a/sparse.1 +++ b/sparse.1 @@ -329,7 +329,7 @@ Sparse does not issue these warnings by default. .B \-Wsizeof-bool Warn when checking the sizeof a _Bool. -C99 does not specify the sizeof a _Bool. gcc uses 1. +C99 does not specify the size of a _Bool. GCC, by default, uses \fI1\fR. Sparse does not issue these warnings by default. . diff --git a/validation/sizeof-bool.c b/validation/sizeof-bool.c index 05e76a44e88e8da71a..9f21d1c65e3705425f 100644 --- a/validation/sizeof-bool.c +++ b/validation/sizeof-bool.c @@ -8,6 +8,6 @@ static int a(void) * number of bytes * check-command: sparse -Wsizeof-bool $file * check-error-start -sizeof-bool.c:3:16: warning: expression using sizeof bool +sizeof-bool.c:3:16: warning: expression using sizeof _Bool * check-error-end */