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 596313 - gstv4lelement.c:168: error: ‘client’ may be used uninitialized in this function
gstv4lelement.c:168: error: ‘client’ may be used uninitialized in this function
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-25 14:13 UTC by kuh3h3
Modified: 2009-10-07 09:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
v4l: fix compiler warning (885 bytes, patch)
2009-09-25 14:36 UTC, Tim-Philipp Müller
accepted-commit_after_freeze Details | Review

Description kuh3h3 2009-09-25 14:13:02 UTC
cc1: warnings being treated as errors
gstv4lelement.c: In function ‘gst_v4l_class_probe_devices_with_udev’:
gstv4lelement.c:168: error: ‘client’ may be used uninitialized in this function
make[3]: *** [libgstvideo4linux_la-gstv4lelement.lo] 오류 1
make[2]: *** [all-recursive] 오류 1
make[1]: *** [all-recursive] 오류 1
make: *** [all] 오류 2
*** Error during phase build of gst-plugins-base: ########## Error running make   *** [61/233]

maybe 

 client = g_udev_client_new (NULL);
    if (!client) {
      GST_WARNING ("Failed to initialize gudev client");
      goto finish;
    }

finish:
  if (client) {
    g_object_unref (client);
  }

in goto finish
client may be used uninitialized?
Comment 1 kuh3h3 2009-09-25 14:20:07 UTC
can i remove -Werror option?
my jhbuild set -Werror option .why?
Comment 2 Tim-Philipp Müller 2009-09-25 14:29:14 UTC
Because that's the default we use when building from git.

You can do

  make ERROR_CFLAGS=''

to build without the -Werror.
Comment 3 Tim-Philipp Müller 2009-09-25 14:36:02 UTC
Created attachment 144001 [details] [review]
v4l: fix compiler warning

This should fix it. Will push once -base is unfrozen again.
Comment 4 kuh3h3 2009-09-25 14:48:17 UTC
thanks for quick answer :)
Comment 5 Tim-Philipp Müller 2009-10-07 09:39:21 UTC
Pushed:

 commit a039d3a1a6c649b8a8496bf60066c48272551d47
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Fri Sep 25 15:32:18 2009 +0100

    v4l: fix compiler warning
    
    Fix 'variable may be used uninitialized' compiler warning (which is
    true in theory, but can't actually ever happen, since we always
    call the function with check=FALSE).
    
    Fixes #596313.