From: Enlightenment S. <no-...@en...> - 2011-09-03 21:09:36
|
Log: Emotion: Fix signed warnings Author: englebass Date: 2011-09-03 14:09:28 -0700 (Sat, 03 Sep 2011) New Revision: 63135 Trac: http://trac.enlightenment.org/e/changeset/63135 Modified: trunk/emotion/src/modules/generic/Emotion_Generic_Plugin.h trunk/emotion/src/modules/generic/emotion_generic.c Modified: trunk/emotion/src/modules/generic/Emotion_Generic_Plugin.h =================================================================== --- trunk/emotion/src/modules/generic/Emotion_Generic_Plugin.h 2011-09-03 21:09:24 UTC (rev 63134) +++ trunk/emotion/src/modules/generic/Emotion_Generic_Plugin.h 2011-09-03 21:09:28 UTC (rev 63135) @@ -98,9 +98,9 @@ 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; } Modified: trunk/emotion/src/modules/generic/emotion_generic.c =================================================================== --- trunk/emotion/src/modules/generic/emotion_generic.c 2011-09-03 21:09:24 UTC (rev 63134) +++ trunk/emotion/src/modules/generic/emotion_generic.c 2011-09-03 21:09:28 UTC (rev 63135) @@ -170,9 +170,9 @@ 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); |