[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] [patch] fix compile error with --enable-directfb option



Hi all,

When compiling evas with --enable-directfb option, compile failed with

...
make[5]: Entering directory
`/home/tyama/fac_e17/enlightenment/e17/libs/evas/src/modules/engines/directfb'
if /bin/sh ../../../../libtool --tag=CC --mode=compile
x86_64-gentoo-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I.
-I../../../../src/lib -I../../../../src/lib/include
-I/usr/include/freetype2 -D_REENTRANT -I/usr/include/directfb      -g
-march=athlon64 -pipe -MT evas_engine_dfb.lo -MD -MP -MF
".deps/evas_engine_dfb.Tpo" -c -o evas_engine_dfb.lo
evas_engine_dfb.c; \
	then mv -f ".deps/evas_engine_dfb.Tpo" ".deps/evas_engine_dfb.Plo";
else rm -f ".deps/evas_engine_dfb.Tpo"; exit 1; fi
 x86_64-gentoo-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../../..
-I. -I../../../../src/lib -I../../../../src/lib/include
-I/usr/include/freetype2 -D_REENTRANT -I/usr/include/directfb -g
-march=athlon64 -pipe -MT evas_engine_dfb.lo -MD -MP -MF
.deps/evas_engine_dfb.Tpo -c evas_engine_dfb.c  -fPIC -DPIC -o
.libs/evas_engine_dfb.o
evas_engine_dfb.c:67: warning: initialization from incompatible pointer type
evas_engine_dfb.c:88: warning: initialization from incompatible pointer type
evas_engine_dfb.c:90: warning: initialization from incompatible pointer type
evas_engine_dfb.c:97: warning: initialization from incompatible pointer type
evas_engine_dfb.c:98: warning: initialization from incompatible pointer type
evas_engine_dfb.c:99: warning: initialization from incompatible pointer type
evas_engine_dfb.c:100: warning: initialization from incompatible pointer type
evas_engine_dfb.c:101: warning: initialization from incompatible pointer type
evas_engine_dfb.c:102: warning: initialization from incompatible pointer type
evas_engine_dfb.c:103: warning: initialization from incompatible pointer type
evas_engine_dfb.c: In function 'evas_engine_directfb_gradient_is_opaque':
evas_engine_dfb.c:903: warning: dereferencing 'void *' pointer
evas_engine_dfb.c:903: error: request for member 'type' in something
not a structure or union
evas_engine_dfb.c:904: error: 'gr' undeclared (first use in this function)
evas_engine_dfb.c:904: error: (Each undeclared identifier is reported only once
evas_engine_dfb.c:904: error: for each function it appears in.)
evas_engine_dfb.c: In function 'eng_gradient_render_pre':
evas_engine_dfb.c:925: warning: dereferencing 'void *' pointer
evas_engine_dfb.c:925: error: request for member 'type' in something
not a structure or union
evas_engine_dfb.c:926: warning: dereferencing 'void *' pointer
evas_engine_dfb.c:926: error: request for member 'type' in something
not a structure or union
evas_engine_dfb.c:927: warning: dereferencing 'void *' pointer
evas_engine_dfb.c:927: error: request for member 'type' in something
not a structure or union
make[5]: *** [evas_engine_dfb.lo] Error 1


Attached is a patch to fix this compile error.

----
Takayuki YAMAGUCHI
--- e17/libs/evas/src/modules/engines/directfb/evas_engine_dfb.c	2006-10-15 11:51:14.000000000 +0900
+++ e17/libs/evas/src/modules/engines/directfb/evas_engine_dfb.c	2006-10-15 12:42:34.259558500 +0900
@@ -898,9 +898,10 @@
 {
    RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
    Render_Engine *re;
+   RGBA_Gradient *gr=(RGBA_Gradient *)gradient;
 
    re = (Render_Engine *)data;
-   if (!dc || !gradient || !gradient->type.geometer)  return 0;
+   if (!dc || !gr || !gr->type.geometer)  return 0;
    return !(gr->type.geometer->has_alpha(gradient, dc->render_op) |
               gr->type.geometer->has_mask(gradient, dc->render_op));
 }
@@ -920,11 +921,12 @@
 {
    int  len;
    Render_Engine *re;
+   RGBA_Gradient *gr=(RGBA_Gradient *)gradient;
 
    re = (Render_Engine *)data;
-   if (!context || !gradient || !gradient->type.geometer) return;
-   gradient->type.geometer->geom_set(gradient);
-   len = gradient->type.geometer->get_map_len(gradient);
+   if (!context || !gr || !gr->type.geometer) return;
+   gr->type.geometer->geom_set(gradient);
+   len = gr->type.geometer->get_map_len(gradient);
    evas_common_gradient_map(context, gradient, len);
 }