After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591215 - Warning building unix-streams.o
Warning building unix-streams.o
Status: RESOLVED DUPLICATE of bug 602031
Product: glib
Classification: Platform
Component: gio
2.21.x
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-08-09 09:21 UTC by Luca Ferretti
Modified: 2009-11-24 01:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Luca Ferretti 2009-08-09 09:21:48 UTC
/bin/bash ../../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall  -L/opt/gnome2/lib64  -o unix-streams unix-streams.o ../../glib/libglib-2.0.la ../../gobject/libgobject-2.0.la ../../gio/libgio-2.0.la ../../gthread/libgthread-2.0.la 
unix-streams.c: In function ‘reader_thread’:
unix-streams.c:80: warning: ‘nread’ may be used uninitialized in this function
Comment 1 Allison Karlitskaya (desrt) 2009-11-12 04:25:44 UTC
what version of GCC is this?

it seems *very* clear to me that nread is always initialised.



  do
    {
      total = 0;
      while (total < (gssize) sizeof (DATA))
        {
          nread = g_input_stream_read (in, buf + total, sizeof (buf) - total,


since 'total' is definitely less than sizeof (DATA) at least once
Comment 2 Luca Ferretti 2009-11-12 20:27:22 UTC
(In reply to comment #1)
> what version of GCC is this?
> 

It *was* gcc 4.3.3 in Ubuntu 9.04 (http://packages.ubuntu.com/jaunty/gcc). I've upgraded to 9.10 so I'm no longer able to re-run. I'll check if gcc 4.4.1 has the same issue when I'll start to jhbuild again.
Comment 3 Luca Ferretti 2009-11-12 20:28:12 UTC
OT the new bugzilla doesn't ask for NEEDINFO resolution??
Comment 4 Javier Jardón (IRC: jjardon) 2009-11-24 01:48:57 UTC
Fixed (and committed) in this patch: https://bugzilla.gnome.org/attachment.cgi?id=147830&action=edit

*** This bug has been marked as a duplicate of bug 602031 ***