Result of 'malloc' is converted to a pointer of type 'unsigned char', which is 
incompatible with sizeof operand type 'char'

Signed-off-by: Amadeusz Sławiński <am...@asmblr.net>
---
 wrlib/load_xpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wrlib/load_xpm.c b/wrlib/load_xpm.c
index 441d957..35adbb1 100644
--- a/wrlib/load_xpm.c
+++ b/wrlib/load_xpm.c
@@ -79,7 +79,7 @@ RImage *RGetImageFromXPMData(RContext * context, char 
**xpmData)
 
        /* make color table */
        for (i = 0; i < 4; i++) {
-               color_table[i] = malloc(xpm.ncolors * sizeof(char));
+               color_table[i] = malloc(xpm.ncolors * sizeof(unsigned char));
                if (!color_table[i]) {
                        for (i = i - 1; i >= 0; i--) {
                                if (color_table[i])
@@ -199,7 +199,7 @@ RImage *RLoadXPM(RContext * context, const char *file)
 
        /* make color table */
        for (i = 0; i < 4; i++) {
-               color_table[i] = malloc(xpm.ncolors * sizeof(char));
+               color_table[i] = malloc(xpm.ncolors * sizeof(unsigned char));
                if (!color_table[i]) {
                        for (i = i - 1; i >= 0; i--) {
                                if (color_table[i])
-- 
1.9.3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to