Re: [PATCH 3/3] Fix discards 'const' qualifier from pointer target type warnings

Steve Grubb
2013-02-09T17:22:05Z

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