* + lib-fix-uninitialized_varcocci-warning.patch added to -mm tree
@ 2022-03-16 20:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-03-16 20:54 UTC (permalink / raw)
To: mm-commits, guozhengkui, akpm
The patch titled
Subject: lib/glob.c: fix uninitialized_var.cocci warning
has been added to the -mm tree. Its filename is
lib-fix-uninitialized_varcocci-warning.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/lib-fix-uninitialized_varcocci-warning.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/lib-fix-uninitialized_varcocci-warning.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Guo Zhengkui <guozhengkui@vivo.com>
Subject: lib/glob.c: fix uninitialized_var.cocci warning
Fix the following coccicheck warning:
lib/glob.c:48:40-41: WARNING this kind of initialization is deprecated.
`char const *back_str = back_str` has the same form of uninitialized_var()
macro. I remove the redundant assignement. It has been tested with gcc
(Debian 8.3.0-6) 8.3.0.
The patch which removed uninitialized_var() is:
https://lore.kernel.org/all/20121028102007.GA7547@gmail.com/
And there are very few "/* GCC */" comments in the Linux kernel code now.
Link: https://lkml.kernel.org/r/20220316072709.4746-1-guozhengkui@vivo.com
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/glob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/glob.c~lib-fix-uninitialized_varcocci-warning
+++ a/lib/glob.c
@@ -45,7 +45,7 @@ bool __pure glob_match(char const *pat,
* (no exception for /), it can be easily proved that there's
* never a need to backtrack multiple levels.
*/
- char const *back_pat = NULL, *back_str = back_str;
+ char const *back_pat = NULL, *back_str;
/*
* Loop over each token (character or class) in pat, matching
_
Patches currently in -mm which might be from guozhengkui@vivo.com are
userfaultfd-selftests-fix-uninitialized_varcocci-warning.patch
lib-fix-uninitialized_varcocci-warning.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-16 20:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 20:54 + lib-fix-uninitialized_varcocci-warning.patch added to -mm tree Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).