[PATCH 3/9] include: change RegionSize() to take a size_t

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 30 16:52:40 PDT 2014


/usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes
signedness: 'int' to 'unsigned long' [-Wsign-conversion]
    return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
                                   ^  ~

Really only just pushes the problem to the caller, but maybe that motivates
someone to fix it.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 include/regionstr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/regionstr.h b/include/regionstr.h
index 4a0725d..515e93f 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -125,7 +125,7 @@ RegionEnd(RegionPtr reg)
 }
 
 static inline size_t
-RegionSizeof(int n)
+RegionSizeof(size_t n)
 {
     return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
 }
-- 
2.1.0



More information about the xorg-devel mailing list