Compilation break without cast.

Submitted by helio@kde.org on Jan. 2, 2015, 12:42 p.m.

Details

Message ID 1420202567-3862-1-git-send-email-helio@kde.org
State Superseded
Headers show

Not browsing as part of any series.

Commit Message

helio@kde.org Jan. 2, 2015, 12:42 p.m.
From: Helio Chissini de Castro <helio@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@kde.org>
---
 include/regionstr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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;
         }