Hello community, here is the log from the commit of package sparse for openSUSE:Factory checked in at 2020-09-25 16:35:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sparse (Old) and /work/SRC/openSUSE:Factory/.sparse.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sparse" Fri Sep 25 16:35:40 2020 rev:43 rq:837254 version:0.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/sparse/sparse.changes 2020-09-16 19:39:34.258814836 +0200 +++ /work/SRC/openSUSE:Factory/.sparse.new.4249/sparse.changes 2020-09-25 16:36:53.788175919 +0200 @@ -1,0 +2,8 @@ +Fri Sep 25 05:28:22 UTC 2020 - Jiri Slaby <jsl...@suse.com> + +- add patches + * 0001-gensel-remove-unneeded-test-uninitialized-warning.patch + * 0002-generic-fix-missing-inlining-of-generic-expression.patch + * 0004-sindex.1-Use-for-a-plain-quote-char.patch + +------------------------------------------------------------------- New: ---- 0001-gensel-remove-unneeded-test-uninitialized-warning.patch 0002-generic-fix-missing-inlining-of-generic-expression.patch 0004-sindex.1-Use-for-a-plain-quote-char.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sparse.spec ++++++ --- /var/tmp/diff_new_pack.ekxobt/_old 2020-09-25 16:36:54.380176445 +0200 +++ /var/tmp/diff_new_pack.ekxobt/_new 2020-09-25 16:36:54.384176448 +0200 @@ -24,6 +24,9 @@ Group: Development/Tools/Building URL: https://sparse.wiki.kernel.org/index.php/Main_Page Source: https://mirrors.edge.kernel.org/pub/software/devel/sparse/dist/%{name}-%{version}.tar.xz +Patch0: 0001-gensel-remove-unneeded-test-uninitialized-warning.patch +Patch1: 0002-generic-fix-missing-inlining-of-generic-expression.patch +Patch2: 0004-sindex.1-Use-for-a-plain-quote-char.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel @@ -69,7 +72,7 @@ LLVM backend for sparse, including sparsec %prep -%setup -q +%autosetup -p1 %build %make_build \ ++++++ 0001-gensel-remove-unneeded-test-uninitialized-warning.patch ++++++ From: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Date: Sun, 21 Jun 2020 21:25:03 +0200 Subject: gensel: remove unneeded test/uninitialized warning Git-repo: git://git.kernel.org/pub/scm/devel/sparse/sparse.git Git-commit: cc651aa7b6a01c3d89d1eb212a080d683f2df9ed Patch-mainline: maint-v0.6.2 branch References: maint-v0.6.2 When evaluation generic selections, it is tested if the type in the selection is a SYM_NODE or not, but: * all these are SYM_NODE * the variable for the base type would be uninitialized if not a SYM_NODE. So, remove the test and unconditionally set the base type. Reported-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Signed-off-by: Jiri Slaby <jsl...@suse.cz> --- evaluate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/evaluate.c b/evaluate.c index aa0f2080..461c2547 100644 --- a/evaluate.c +++ b/evaluate.c @@ -3304,9 +3304,7 @@ static struct symbol *evaluate_generic_selection(struct expression *expr) if (!evaluate_symbol(stype)) continue; - if (stype->type == SYM_NODE) - base = stype->ctype.base_type; - + base = stype->ctype.base_type; if (base->type == SYM_ARRAY && base->array_size) { get_expression_value_silent(base->array_size); if (base->array_size->type == EXPR_VALUE) -- 2.26.2 ++++++ 0002-generic-fix-missing-inlining-of-generic-expression.patch ++++++ From: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Date: Fri, 24 Jul 2020 16:07:07 +0200 Subject: generic: fix missing inlining of generic expression Git-repo: git://git.kernel.org/pub/scm/devel/sparse/sparse.git Git-commit: 77f35b796cc82b820e1994629fade50bacbffcbb Patch-mainline: maint-v0.6.2 branch References: maint-v0.6.2 Inlining in sparse works slightly differently than what my mental model is: the body is only evaluated after the inline expansion. IOW, an inline function is not evaluated until it is effectively inlined. That's fine but it means that generic expressions also need to be handled during the inlining. However, since the body of inline functions is evaluated just after inline expansion, so (recursively) copying the expression and its type - expression map is quite useless here. So, just copy the expression itself and its control expression to 'isolate' them from evaluation, evaluate it and then just copy the selected expression. Reported-by: kernel test robot <l...@intel.com> Reported-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Signed-off-by: Jiri Slaby <jsl...@suse.cz> --- inline.c | 8 ++++++++ validation/inline-generic.c | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 validation/inline-generic.c diff --git a/inline.c b/inline.c index a9597280..eceef8ba 100644 --- a/inline.c +++ b/inline.c @@ -274,6 +274,14 @@ static struct expression * copy_expression(struct expression *expr) } break; } + case EXPR_GENERIC: + expr = dup_expression(expr); + expr->control = copy_expression(expr->control); + if (!evaluate_expression(expr)) + return NULL; + expr = copy_expression(expr); + break; + default: warning(expr->pos, "trying to copy expression type %d", expr->type); } diff --git a/validation/inline-generic.c b/validation/inline-generic.c new file mode 100644 index 00000000..1f05c079 --- /dev/null +++ b/validation/inline-generic.c @@ -0,0 +1,10 @@ +extern int a, b; +inline int c(void) { return a++; } +inline int e(int d) { return 0; } +inline unsigned f(void) { return e(_Generic(b, int: c())); } +static int g(void) { return f(); } +static int h(void) { return f(); } + +/* + * check-name: inline-generic + */ -- 2.26.2 ++++++ 0004-sindex.1-Use-for-a-plain-quote-char.patch ++++++ From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u...@kleine-koenig.org> Date: Fri, 31 Jul 2020 23:41:25 +0200 Subject: sindex.1: Use ' for a plain quote char MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-repo: git://git.kernel.org/pub/scm/devel/sparse/sparse.git Git-commit: b47eba2000302ab464b03a946dd30016134115d4 Patch-mainline: maint-v0.6.2 branch References: maint-v0.6.2 lintian (a linter for Debian packages) warns: N: This manual page uses the \' groff sequence. Usually, the intent to N: generate an apostrophe, but that sequence actually renders as a an acute N: accent. N: N: For an apostrophe or a single closing quote, use plain '. For single N: opening quote, i.e. a straight downward line ' like the one used in N: shell commands, use \(aq. I'm not following its advice but stick to ' as is done in other places of sindex.1. Signed-off-by: Uwe Kleine-König <u...@kleine-koenig.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenr...@gmail.com> Acked-by: Alexey Gladkov <gladkov.ale...@gmail.com> Signed-off-by: Jiri Slaby <jsl...@suse.cz> --- sindex.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sindex.1 b/sindex.1 index e3e14ca3..d7c5173a 100644 --- a/sindex.1 +++ b/sindex.1 @@ -128,8 +128,8 @@ struct member . .SH MODE The \fBMODE\fR is dumped as a 3-letter string. The first letter denotes address -of part, 2-nd - access by value, 3-rd - access by pointer. A special value -\'\fIdef\fR\' means a symbol definition. +of part, 2-nd - access by value, 3-rd - access by pointer. A special +value '\fIdef\fR' means a symbol definition. .TP \fBr\fR read -- 2.26.2