On Tue, Apr 6, 2010 at 10:19 AM, Matt Turner <[email protected]> wrote: > On Mon, Apr 5, 2010 at 2:11 PM, Cyril Brulebois <[email protected]> wrote: >> This avoids some noise during building: >> CC radeon_accel.lo >> radeon_accel.c: In function ‘RADEONHostDataBlit’: >> radeon_accel.c:855: warning: ‘__expected’ may be used uninitialized in this >> function >> >> Signed-off-by: Cyril Brulebois <[email protected]> >> --- >> src/radeon.h | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/src/radeon.h b/src/radeon.h >> index 88f1516..d73329d 100644 >> --- a/src/radeon.h >> +++ b/src/radeon.h >> @@ -1425,7 +1425,7 @@ do { >> \ >> >> #define RADEON_VERBOSE 0 >> >> -#define RING_LOCALS uint32_t *__head = NULL; int __expected; int __count >> = 0 >> +#define RING_LOCALS uint32_t *__head = NULL; int __expected = 0; int >> __count = 0 >> >> #define BEGIN_RING(n) do { \ >> if (RADEON_VERBOSE) { \ >> -- >> 1.7.0.3 >> >> _______________________________________________ >> xorg-driver-ati mailing list >> [email protected] >> http://lists.x.org/mailman/listinfo/xorg-driver-ati >> > > Someone else double check me, but I don't think there's anything wrong > with this. It looks like the warning is bogus. > > __expected only appears in the RING_LOCALS, BEGIN_RING, and > ADVANCE_RING macros (src/radeon.h). > > __expected is initialized in BEGIN_RING in the if (!info->cs) path. > Then it's only used in the if (!info->cs) path in ADVANCE_RING. > > I'm not familiar with this code, but the only case that __expected > could be uninitialized is if at the time of BEGIN_RING info->cs was > true, and at the time of ADVANCE_RING info->cs was false. > > Someone else give it a look.
That's correct. Alex _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
