analyzer: fix missing comma in initializer

Message ID ce1caf7b-e543-8eca-7282-079f50d3c578@suse.cz
State New
Headers show
Series
  • analyzer: fix missing comma in initializer
Related show

Commit Message

Martin Liška March 15, 2021, 8:32 a.m.
Fixes the following valid clang warning:

gcc/analyzer/sm-file.cc:250:5: warning: suspicious concatenation of string literals in an array initialization;
did you mean to separate the elements with a comma? [-Wstring-concatenation]

Survives make check -k RUNTESTFLAGS="analyzer.exp".

Ready to be installed?
Thanks,
Martin

gcc/analyzer/ChangeLog:

	* sm-file.cc (get_file_using_fns): Add missing comma in initializer.
---
  gcc/analyzer/sm-file.cc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.1

Comments

Richard Sandiford via Gcc-patches March 15, 2021, 12:24 p.m. | #1
On Mon, 2021-03-15 at 09:32 +0100, Martin Liška wrote:
> Fixes the following valid clang warning:

> 

> gcc/analyzer/sm-file.cc:250:5: warning: suspicious concatenation of

> string literals in an array initialization;

> did you mean to separate the elements with a comma? [-Wstring-

> concatenation]

> 

> Survives make check -k RUNTESTFLAGS="analyzer.exp".

> 

> Ready to be installed?

> Thanks,

> Martin


LGTM

Thanks
Dave

> gcc/analyzer/ChangeLog:

> 

>         * sm-file.cc (get_file_using_fns): Add missing comma in

> initializer.

> ---

>   gcc/analyzer/sm-file.cc | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/gcc/analyzer/sm-file.cc b/gcc/analyzer/sm-file.cc

> index 48ef4aa2334..7a81c8ff632 100644

> --- a/gcc/analyzer/sm-file.cc

> +++ b/gcc/analyzer/sm-file.cc

> @@ -246,7 +246,7 @@ get_file_using_fns ()

>       "__fbufsize",

>       "__flbf",

>       "__fpending",

> -    "__fpurge"

> +    "__fpurge",

>       "__freadable",

>       "__freading",

>       "__fsetlocking",

Patch

diff --git a/gcc/analyzer/sm-file.cc b/gcc/analyzer/sm-file.cc
index 48ef4aa2334..7a81c8ff632 100644
--- a/gcc/analyzer/sm-file.cc
+++ b/gcc/analyzer/sm-file.cc
@@ -246,7 +246,7 @@  get_file_using_fns ()
      "__fbufsize",
      "__flbf",
      "__fpending",
-    "__fpurge"
+    "__fpurge",
      "__freadable",
      "__freading",
      "__fsetlocking",