Re: [AD] 4.3.0 progress

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Saturday 22 July 2006 06:50, Peter Wang wrote:
> I would be nice if some other people tested it as well before then.

It won't compile with --enable-strictwarn on my Linux machine, using GCC 4.1. 
It complains about possibly using an uninitialized struct in 
src/compat/cotimer.c (even though it really can't). The attached patch fixes 
that. It then complains about type-punning in grabber.c, but this isn't 
easilly fixable with how the code is all structured.

Given that the GUI is probably going to be removed from the new API, I don't 
think grabber can stay around as it is. A (possibly radical) idea might be to 
just remove the current grabber (4.2's could be used in the mean time), and 
make a completely new grabber using Qt4. It's cross-platform almost 
everywhere, free for non-commercial use, will look like a native Windows app 
in Windows, will look good in X, etc. Checks could be done to see if it's 
installed on the user's system and build the grabber if so.
Index: src/compat/cotimer.c
===================================================================
--- src/compat/cotimer.c	(revision 7366)
+++ src/compat/cotimer.c	(working copy)
@@ -20,6 +20,9 @@
  */
 
 
+#include <string.h>
+
+
 #include "allegro.h"
 #include "allegro/internal/aintern.h"
 #include ALLEGRO_INTERNAL_HEADER
@@ -160,6 +163,8 @@
          TIMER_QUEUE copy;
          int x;
 
+         memset(&copy, 0, sizeof(copy));
+
          /* We delay the call until the timer_mutex is unlocked, to
           * avoid deadlocks. The callback itself can add or remove
           * timers. Using a recursive mutex isn't enough either.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/