[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH 5/7] input: un-constify dev->name
From:       Julien Cristau <jcristau () debian ! org>
Date:       2014-01-30 13:28:25
Message-ID: 20140130132825.GG3765 () betterave ! cristau ! org
[Download RAW message or body]

On Thu, Jan 30, 2014 at 09:48:01 +0100, Hans de Goede wrote:

> Hi,
> 
> On 01/30/2014 12:51 AM, Peter Hutterer wrote:
> > Fallout from fecc7eb1cf66db64728ee2d68cd9443df7e70879, and reverts most of the
> > rest of that patch.
> > 
> > The device name is allocated and may even change during PreInit. The const
> > warnings came from the test codes, the correct fix here is to fix the test
> > code.
> > 
> > touch.c: In function ‘touch_init':
> > touch.c:254:14: warning: assignment discards ‘const' qualifier from pointer \
> > target type [enabled by default] dev.name = "test device";
> > 
> > Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
> 
> Again, please use XNFstrdup instead of strdup sorry for being a PITA about this,
> but IMHO we should always check for malloc errors, rather then ignore them \
> silently. Yes they should never happen that is why "tearing the house down" is an \
> ok response to malloc errors, ignoring them is not.
> 
> I guess we already have a lot of code getting this wrong, but that is not an excuse
> to add more code getting it wrong.
> 
Again this is in the unit tests, it doesn't matter...

Cheers,
Julien
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic