public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-41] Fix clang warning (-Wstring-plus-int)
@ 2021-04-21 14:54 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-04-21 14:54 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e9fc9d075f303b50c77c7b497b2982fe6dc7f5c1

commit r12-41-ge9fc9d075f303b50c77c7b497b2982fe6dc7f5c1
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Apr 21 16:52:17 2021 +0200

    Fix clang warning (-Wstring-plus-int)
    
    This fixes:
    
    lto-plugin.c:642:7: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
    
    lto-plugin/ChangeLog:
    
            * lto-plugin.c (exec_lto_wrapper): Make a temp variable.

Diff:
---
 lto-plugin/lto-plugin.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 32478f070e8..4e90ce03ade 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -636,10 +636,10 @@ exec_lto_wrapper (char *argv[])
 
   /* Write argv to a file to avoid a command line that is too long
      Save the file locally on save-temps.  */
+  const char *suffix = ".lto_wrapper_args";
+  suffix += skip_in_suffix;
   if (save_temps && link_output_name)
-    arguments_file_name = concat (link_output_name,
-				  ".lto_wrapper_args"
-				  + skip_in_suffix, NULL);
+    arguments_file_name = concat (link_output_name, suffix, NULL);
   else
     arguments_file_name = make_temp_file (".lto_wrapper_args");
   check (arguments_file_name, LDPL_FATAL,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-21 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 14:54 [gcc r12-41] Fix clang warning (-Wstring-plus-int) Martin Liska

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 read-only IMAP folder(s) and NNTP newsgroup(s).