Emotion: Fix signed warnings
authorSebastian Dransfeld <sd@tango.flipp.net>
Sat, 3 Sep 2011 21:09:28 +0000 (21:09 +0000)
committerSebastian Dransfeld <sd@tango.flipp.net>
Sat, 3 Sep 2011 21:09:28 +0000 (21:09 +0000)
SVN revision: 63135

legacy/emotion/src/modules/generic/Emotion_Generic_Plugin.h
legacy/emotion/src/modules/generic/emotion_generic.c

index b85f647731083a1f26ba824401c03ac9d887b4e8..a43ebd3e7ad1c356d3a348e61f667a88910577af 100644 (file)
@@ -98,9 +98,9 @@ emotion_generic_shm_get(const char *shmname, Emotion_Generic_Video_Shared **vs,
    munmap(t_vs, sizeof(*t_vs));
    t_vs = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
 
-   vf->frames[0] = (char *)t_vs + sizeof(*t_vs);
-   vf->frames[1] = (char *)t_vs + sizeof(*t_vs) + t_vs->height * t_vs->width * t_vs->pitch;
-   vf->frames[2] = (char *)t_vs + sizeof(*t_vs) + 2 * t_vs->height * t_vs->width * t_vs->pitch;
+   vf->frames[0] = (unsigned char *)t_vs + sizeof(*t_vs);
+   vf->frames[1] = (unsigned char *)t_vs + sizeof(*t_vs) + t_vs->height * t_vs->width * t_vs->pitch;
+   vf->frames[2] = (unsigned char *)t_vs + sizeof(*t_vs) + 2 * t_vs->height * t_vs->width * t_vs->pitch;
 
    *vs = t_vs;
 }
index 920869cbaece4d64c2b39e145f4f0f395078e61d..010dec1d6ed42c127b0eff1830acc842118f7f43 100644 (file)
@@ -170,9 +170,9 @@ _create_shm_data(Emotion_Generic_Video *ev, const char *shmname)
    vs->frame.last = 2;
    vs->frame.next = 2;
    sem_init(&vs->lock, 1, 1);
-   ev->frame.frames[0] = (char *)vs + sizeof(*vs);
-   ev->frame.frames[1] = (char *)vs + sizeof(*vs) + vs->height * vs->width * vs->pitch;
-   ev->frame.frames[2] = (char *)vs + sizeof(*vs) + 2 * vs->height * vs->width * vs->pitch;
+   ev->frame.frames[0] = (unsigned char *)vs + sizeof(*vs);
+   ev->frame.frames[1] = (unsigned char *)vs + sizeof(*vs) + vs->height * vs->width * vs->pitch;
+   ev->frame.frames[2] = (unsigned char *)vs + sizeof(*vs) + 2 * vs->height * vs->width * vs->pitch;
 
    if (ev->shared)
      munmap(ev->shared, ev->shared->size);