]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Pacify Oracle Studio 12.6 in init_switches
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Aug 2019 07:40:05 +0000 (00:40 -0700)
committerPaul Smith <psmith@gnu.org>
Mon, 2 Sep 2019 15:11:26 +0000 (11:11 -0400)
* src/main.c (init_switches): Use a cast to convert char const *
to char *.  Without this patch, the compiler complains
‘"src/main.c", line 2643: warning: assignment type mismatch:
pointer to char "=" pointer to const char’.

src/main.c

index 3e9a9056d5743eb29292921269bf1c8280d3577b..07ca6e64071bb06fd81fe1088d9e1bc8c810af60 100644 (file)
@@ -2639,8 +2639,8 @@ init_switches (void)
 
   for (i = 0; switches[i].c != '\0'; ++i)
     {
-      long_options[i].name = (switches[i].long_name == 0 ? "" :
-                              switches[i].long_name);
+      long_options[i].name = (char *) (switches[i].long_name == 0 ? "" :
+                                      switches[i].long_name);
       long_options[i].flag = 0;
       long_options[i].val = switches[i].c;
       if (short_option (switches[i].c))