On Wed, 11 Feb 2009 18:56:04 +0100, Enlightenment SVN 
<no-re...@enlightenment.org> wrote:

> Log:
>       * evas/m4/ac_attribute.m4,
>       * evas/src/lib/canvas/evas_async_events.c: Fix long standing warning  
> from valgrind.
>Author:       cedric
> Date:         2009-02-11 09:56:03 -0800 (Wed, 11 Feb 2009)
> New Revision: 38996
>
> Modified:
>   trunk/evas/m4/ac_attribute.m4  
> trunk/evas/src/lib/canvas/evas_async_events.c
>
> Modified: trunk/evas/m4/ac_attribute.m4
> ===================================================================
> --- trunk/evas/m4/ac_attribute.m4     2009-02-11 11:49:43 UTC (rev 38995)
> +++ trunk/evas/m4/ac_attribute.m4     2009-02-11 17:56:03 UTC (rev 38996)
> @@ -39,8 +39,9 @@
>  if test "x${ac_cv___attribute__}" = "xyes" ; then
>     AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler  
> has __attribute__])
>     AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring  
> a function argument to be unused])
> +   AC_DEFINE([__PACKED__], [__attribute__((packed))], [Macro declaring  
> a function argument to be unused])
>    else
> -    AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to  
> be unused])
> +    AC_DEFINE([__PACKED__], [], [Macro declaring a function argument to  
> be unused])
>  fi
> ])
>
> Modified: trunk/evas/src/lib/canvas/evas_async_events.c
> ===================================================================
> --- trunk/evas/src/lib/canvas/evas_async_events.c     2009-02-11 11:49:43  
> UTC (rev 38995)
> +++ trunk/evas/src/lib/canvas/evas_async_events.c     2009-02-11 17:56:03  
> UTC (rev 38996)
> @@ -21,7 +21,7 @@
>     void                       *event_info;
>     void                      (*func)(void *target, Evas_Callback_Type type, 
> void  
> *event_info);
>     Evas_Callback_Type          type;
> -};
> +} __PACKED__ ;
^^^^^^^^^^^^^^^^^

Are you really sure you want to do that? In general struct packing is bad for 
portability and performance, and as far as I can see there is no good reason to 
pack here. IMO silencing valgrind is not a good reason, and there must be some 
other way to fix that.

/Kim

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to