[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Pacify Oracle Studio 12.6 in init_switches
From: |
Paul Eggert |
Subject: |
[PATCH] Pacify Oracle Studio 12.6 in init_switches |
Date: |
Tue, 27 Aug 2019 00:40:05 -0700 |
* 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 3e9a905..07ca6e6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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))
--
2.21.0
- [PATCH] Pacify Oracle Studio 12.6 in init_switches,
Paul Eggert <=