[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23758: 25.1.50; Bogus warning from -Wwrite-strings
From: |
Noam Postavsky |
Subject: |
bug#23758: 25.1.50; Bogus warning from -Wwrite-strings |
Date: |
Sun, 12 Jun 2016 16:01:15 -0400 |
On Sun, Jun 12, 2016 at 3:56 PM, Ken Brown <kbrown@cornell.edu> wrote:
> I'm getting an "assignment discards ‘const’ qualifier from pointer
> target type" warning in the Cygwin-w32 build because of the following
> code in w32fns.c:
>
> char *type_CtrlAlt = NULL;
> [...]
> type_CtrlAlt = "bB";
>
> This warning goes away if I remove -Wwrite-strings from the enabled compiler
> warnings. Is this a compiler bug, or is there really something wrong with
> the code above that should warrant a warning?
I think the warning is correct, and the code shoud use const char *type_CtrlAlt