[PATCH] Compilation break without cast.

helio at kde.org helio at kde.org
Fri Jan 2 04:42:47 PST 2015


From: Helio Chissini de Castro <helio at kde.org>

Missing cast break compilation when base code used for third party
applications, like tigervnc.
Usage of -fpermissive solves compilation issue but can mask the problem.

Red Hat bug https://bugzilla.redhat.com/show_bug.cgi?id=1177687

Signed-off-by: Helio Chissini de Castro <helio at kde.org>
---
 include/regionstr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/regionstr.h b/include/regionstr.h
index 079375d..1032358 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -144,7 +144,7 @@ RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
         size_t rgnSize;
         (_pReg)->extents = RegionEmptyBox;
         if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) &&
-            (((_pReg)->data = malloc(rgnSize)) != NULL)) {
+            (((_pReg)->data = (RegDataPtr) malloc(rgnSize)) != NULL)) {
             (_pReg)->data->size = (_size);
             (_pReg)->data->numRects = 0;
         }
-- 
2.1.0



More information about the xorg-devel mailing list