From: Steve Grubb <sgrubb@redhat.com>
To: Tyler Hicks <tyhicks@canonical.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH 3/3] Fix discards 'const' qualifier from pointer target type warnings
Date: Sat, 09 Feb 2013 12:22:05 -0500 [thread overview]
Message-ID: <48598221.mR9AktQ7x0@x2> (raw)
In-Reply-To: <1360379555-1910-4-git-send-email-tyhicks@canonical.com>
On Friday, February 08, 2013 07:12:35 PM Tyler Hicks wrote:
> The event_note_list pointer is reassigned and its members are also
> reassigned. It should not be declared with the const qualifier.
>
> The ptr variable, in unescape(), cannot be used to modify a string since
> it is initialized to the const char *buf input parameter. Rather than
> modifying buf, we can use ptr as a placeholder and use strndup() to
> allocate str. Later in the function a new, non-const pointer is used to
> modify str. These changes allow unescape() to still take a const char *
> as its input parameter.
>
> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Applied. Thanks for all 3 patches.
-Steve
prev parent reply other threads:[~2013-02-09 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 3:12 [PATCH 0/3] Fix userspace audit compiler warnings Tyler Hicks
2013-02-09 3:12 ` [PATCH 1/3] Don't ignore the return value of asprintf() Tyler Hicks
2013-02-09 16:50 ` Steve Grubb
2013-02-09 3:12 ` [PATCH 2/3] Fix Wunused-return warnings Tyler Hicks
2013-02-09 16:57 ` Steve Grubb
2013-02-09 18:35 ` Tyler Hicks
2013-02-09 3:12 ` [PATCH 3/3] Fix discards 'const' qualifier from pointer target type warnings Tyler Hicks
2013-02-09 17:22 ` Steve Grubb [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=48598221.mR9AktQ7x0@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=tyhicks@canonical.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox