On Sat, 2010-06-26 at 09:35 +0100, Ross Burton wrote: > On Fri, 2010-06-25 at 20:27 -0400, Greg Troxel wrote: > > I got a complaint about gvalue being used undefined, and sure enough the > > code looks like that's possible at first glance. The inference that one > > or the other if branch will be taken because of g_return_val_if_fail > > returning from the function is apparently too subtle for > > > > Using built-in specs. > > Target: i386--netbsdelf > > Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure > > --enable-long-long --disable-multilib --enable-threads --disable-symvers > > --build=x86_64-unknown-netbsd4.99.72 --host=i386--netbsdelf > > --target=i386--netbsdelf --enable-__cxa_atexit > > Thread model: posix > > gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120) > > > > Here's a diff that points out the issues and makes it build for me. > > I'd actually prefer initialising value to NULL so that if you pass an > invalid gconfvalue without warnings on you get a NULL pointer instead of > a uninitialized gvalue.
Actually, the warning is bogus, unless you disabled warnings in glib. Look at the guard at the top, we only handle 2 types of GConf key... Cheers _______________________________________________ GeoClue mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/geoclue
