[OE-core] Recent xserver-kdrive failure and util-macros update

Gary Thomas gary at mlbassoc.com
Wed Jan 4 20:36:19 UTC 2012


On 2012-01-04 13:08, Saul Wold wrote:
> On 01/04/2012 11:45 AM, Gary Thomas wrote:
>> On 2012-01-04 10:39, Khem Raj wrote:
>>> On (03/01/12 23:28), Saul Wold wrote:
>>>>
>>>> We seem to have a relatively new failure in xserver-kdrive, which
>>>> appeared in the last set of change. I tried to run though a bisect
>>>> but was not able to find the problem.
>>>>
>>>> The problem seems to be related to configure.ac setting of
>>>> XSERVER_CFLAGS='$(CWARNFLAGS)' and then using -Werror=address, which
>>>> is what causes the failure.
>>>>
>>>> This seems to be related to the util-macros update to 1.16, which
>>>> adds more warnings to errors. Since we are still using the older
>>>> xserver-kdrive, there are warnings that are now errors with the
>>>> update.
>>>
>>> Fix xserver-kdrive
>>
>> In this case, I don't see why this is an error. All of the errors
>> (that I've found so far) stem from lines like this:
>> REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
>>
> Not all, the newer code has this snippet as a static inline and does not have the failure because it a function.
>
> There's at least one place that it's called with a real pointer in a function.

True, not all of the calls to REGION_INIT are problematic, but all of the errors
are uses of that macro with static pointers.  The attached patch fixes these errors.

>> where the macro REGION_INIT is defined as:
>>
>> #define REGION_INIT(_pScreen, _pReg, _rect, _size) \
>> { \
>> if ((_rect) != NULL) \
>> { \
>> (_pReg)->extents = *(_rect); \
>> (_pReg)->data = (RegDataPtr)NULL; \
>> } \
>> else \
>> { \
>> (_pReg)->extents = miEmptyBox; \
>> if (((_size) > 1) && ((_pReg)->data = \
>> (RegDataPtr)xalloc(REGION_SZOF(_size)))) \
>> { \
>> (_pReg)->data->size = (_size); \
>> (_pReg)->data->numRects = 0; \
>> } \
>> else \
>> (_pReg)->data = &miEmptyData; \
>> } \
>> }
>>
>> This doesn't look like an error to me, but rather an opportunity
>> (to remove never used code).
>>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xserver-kdrive-work-around-issues-with-Werror-addres.patch
Type: text/x-patch
Size: 18271 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120104/1d9869f4/attachment-0002.bin>


More information about the Openembedded-core mailing list