[PATCH 00/37] Warning fixes (post 1.15 proposed changes)

Thierry Reding thierry.reding at gmail.com
Tue Nov 19 00:59:31 PST 2013


On Mon, Nov 18, 2013 at 09:24:00AM -0800, Keith Packard wrote:
> Thierry Reding <thierry.reding at gmail.com> writes:
> 
> > If you absolutely must be able to use either statically or dynamically
> > allocated strings in the same data structure, why not just go and
> > strdup() string constants so that you can treat the structure in the
> > same way subsequently?
> 
>  1) That's not how the code works today, and these additional
>     allocations will result in memory leaks unless we carefully
>     review all code paths to ensure that they get freed.

I know. And I can understand that there's little incentive to do this
"properly" retroactively. It's still unfortunate, though.

>  2) It's a waste of CPU and memory.

Well, I guess that depends on how you look at it. Anyway, you obviously
have your reasons why you want to do this and you've been working on
this code for a long time and know the implications much better. Besides
it's not like this fundamentally changes the behaviour, it just makes
sure that the warnings don't distract from more important ones.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20131119/9965865d/attachment.pgp>


More information about the xorg-devel mailing list