all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 23758-done@debbugs.gnu.org
Subject: bug#23758: 25.1.50; Bogus warning from -Wwrite-strings
Date: Sun, 12 Jun 2016 17:45:09 -0400	[thread overview]
Message-ID: <03834b4d-6a60-3c8a-f647-8eec8657d039@cornell.edu> (raw)
In-Reply-To: <CAM-tV-8ZBQP7_y3VV0mkWQ4RmghEtuUKjtL87mzwB29Z175UFw@mail.gmail.com>

On 6/12/2016 4:01 PM, Noam Postavsky wrote:
> 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

Thank you.  I was confused by the wording of the warning, but now I 
understand the issue.

Closing.

Ken






      reply	other threads:[~2016-06-12 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12 19:56 bug#23758: 25.1.50; Bogus warning from -Wwrite-strings Ken Brown
2016-06-12 20:01 ` Noam Postavsky
2016-06-12 21:45   ` Ken Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03834b4d-6a60-3c8a-f647-8eec8657d039@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=23758-done@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.