From: Ben Pfaff Date: Fri, 8 Jul 2022 17:51:23 +0000 (-0700) Subject: Suppress GCC 12.1.1 warnings. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=27c1e59125a8ab24e037449439476dec8be4f6f6 Suppress GCC 12.1.1 warnings. I don't think these warnings are for real problems, so just suppress them. I don't understand why the change to datasheet-test.c suppresses a warning, but it does. --- diff --git a/Makefile.am b/Makefile.am index 4dfc50c8ec..6693874f58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,7 +75,7 @@ generate-changelog: DIST_HOOKS += generate-changelog -GL_CFLAG_GNULIB_WARNINGS = -Wno-missing-prototypes -Wno-unused-parameter +GL_CFLAG_GNULIB_WARNINGS = -Wno-missing-prototypes -Wno-unused-parameter -Wno-alloc-size-larger-than include $(top_srcdir)/build-aux/automake.mk include $(top_srcdir)/gl/automake.mk diff --git a/tests/data/datasheet-test.c b/tests/data/datasheet-test.c index f0384853e6..5ad31b2db8 100644 --- a/tests/data/datasheet-test.c +++ b/tests/data/datasheet-test.c @@ -699,7 +699,7 @@ datasheet_mc_mutate (struct mc *mc, const void *ods_) datasheet_delete_rows (ds, pos, n); - release_data (n, oproto, &data[pos]); + release_data (n, oproto, data + pos); remove_range (&data[0], n_rows, sizeof data[0], pos, n); check_datasheet (mc, ds, data, n_rows - n, oproto); diff --git a/tests/language/lexer/segment-test.c b/tests/language/lexer/segment-test.c index acb444f200..5977e8fce6 100644 --- a/tests/language/lexer/segment-test.c +++ b/tests/language/lexer/segment-test.c @@ -155,6 +155,7 @@ check_segmentation (const char *input, size_t length, bool print_segments) offset); } assert (offset + n <= length); + assert (offset <= length); if (type == SEG_NEWLINE) {