From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: [PATCH 3/3] Fix discards 'const' qualifier from pointer target type warnings Date: Sat, 09 Feb 2013 12:22:05 -0500 Message-ID: <48598221.mR9AktQ7x0@x2> References: <1360379555-1910-1-git-send-email-tyhicks@canonical.com> <1360379555-1910-4-git-send-email-tyhicks@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360379555-1910-4-git-send-email-tyhicks@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Tyler Hicks Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.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 Applied. Thanks for all 3 patches. -Steve