Summary: | Build failure due to uninitialized variable | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Luca Ferretti <elle.uca> |
Component: | gabble | Assignee: | Guillaume Desmottes <guillaume.desmottes> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | dafydd.harries |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Luca Ferretti
2007-12-20 03:37:43 UTC
Another 2 uninitalized variables: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -I.. -I.. -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib/dbus-1.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/loudmouth-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/telepathy-1.0 -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/lib/dbus-1.0/include -g -O2 -MT tube-stream.lo -MD -MP -MF .deps/tube-stream.Tpo -c tube-stream.c -fPIC -DPIC -o .libs/tube-stream.o cc1: warnings being treated as errors tube-stream.c: In function 'gabble_tube_stream_add_bytestream': tube-stream.c:482: warning: 'len' may be used uninitialized in this function tube-stream.c:479: warning: 'fd' may be used uninitialized in this function make[3]: *** [tube-stream.lo] Error 1 make[3]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble' make: *** [all] Error 2 Another... gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -I.. -I.. -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib/dbus-1.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/loudmouth-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/include/telepathy-1.0 -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include -I/opt/gnome2/lib/dbus-1.0/include -g -O2 -MT tube-stream.lo -MD -MP -MF .deps/tube-stream.Tpo -c tube-stream.c -fPIC -DPIC -o .libs/tube-stream.o cc1: warnings being treated as errors tube-stream.c: In function 'gabble_tube_stream_accept': tube-stream.c:600: warning: 'fd' may be used uninitialized in this function make[3]: *** [tube-stream.lo] Error 1 make[3]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/luca/svn/gnome2/telepathy-gabble' make: *** [all] Error 2 These variables aren't initialized because a g_assert_not_reached was reached and your compiler doesn't understand them as a return. I'm wondering what's the best way to fix these warnings. Add a return after the g_assert_not_reached? Initialize these variables during their declarations? Could you try to build this branch http://people.collabora.co.uk/~cassidy/darcs/telepathy-gabble-build-fix/ and report any other build failure please? Which version of GCC are you using? This branch is now merged to HEAD. So just relaunch your jhbuild should be enough. Could you try please? Sorry for the lag, I was able to take care of this only now. I can confirm there are no more issues rebuilding from a fresh grab. PS the gcc version is: gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) cool. Closing the bug so. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.