]> code.delx.au - gnu-emacs/commitdiff
Fix C99 incompatibilities in Cairo code
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Jun 2015 14:08:23 +0000 (07:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Jun 2015 14:09:04 +0000 (07:09 -0700)
* src/image.c (xpm_load) [USE_CAIRO]:
* src/xterm.c (x_cr_accumulate_data) [USE_CAIRO]:
Fix pointer signedness problem.

src/image.c
src/xterm.c

index dfa8941ab3c3c30595a41b053683810b108ae261..cf96cae038500f81bae2cff877f17658c1db7c13 100644 (file)
@@ -3690,7 +3690,7 @@ xpm_load (struct frame *f, struct image *img)
       int i;
       uint32_t *od = (uint32_t *)data;
       uint32_t *id = (uint32_t *)img->ximg->data;
-      unsigned char *mid = img->mask_img ? img->mask_img->data : 0;
+      char *mid = img->mask_img ? img->mask_img->data : 0;
       uint32_t bgcolor = get_spec_bg_or_alpha_as_argb (img, f);
 
       for (i = 0; i < height; ++i)
index d573738754abc27f233880f3881ba642f6bc44b7..b7aacfa8dca007f009914c3344a0d1a0f8640859 100644 (file)
@@ -552,7 +552,7 @@ x_cr_accumulate_data (void *closure, const unsigned char *data,
 {
   Lisp_Object *acc = (Lisp_Object *) closure;
 
-  *acc = Fcons (make_unibyte_string (data, length), *acc);
+  *acc = Fcons (make_unibyte_string ((char const *) data, length), *acc);
 
   return CAIRO_STATUS_SUCCESS;
 }