diff mbox

[V3] doc: copy-edit text related to applying sizeof to a _Bool

Message ID 20180409234214.r6fidbi3thjnb4nn@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Joey Pabalinas April 9, 2018, 11:42 p.m. UTC
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 <viro@ZenIV.linux.org.uk>
CC: Christopher Li <sparse@chrisli.org>
CC: Joey Pabalinas <joeypabalinas@gmail.com>
CC: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

 evaluate.c               | 2 +-
 sparse.1                 | 2 +-
 validation/sizeof-bool.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Luc Van Oostenryck April 10, 2018, 7:35 p.m. UTC | #1
On Mon, Apr 09, 2018 at 01:42:14PM -1000, Joey Pabalinas wrote:
> Clean up the grammar/capitalization of the -Wsizeof-bool sections and
> italicize the size (1) so that it is consistent with the surrounding
> text.

Thank you very much.

Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joey Pabalinas April 10, 2018, 10:11 p.m. UTC | #2
On Tue, Apr 10, 2018 at 09:35:40PM +0200, Luc Van Oostenryck wrote:
> Thank you very much.
> 
> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

No problem, glad to help out.
diff mbox

Patch

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
  */