Bug 18650

Summary: three small patches to fix a possible bug and avoid gcc warnings
Product: dbus Reporter: Peter Breitenlohner <peb>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: walters
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: avoid nested extern warning
avoid use of uninitialized variable
avoid incompatible pointer type warning

Description Peter Breitenlohner 2008-11-21 04:54:34 UTC
Created attachment 20490 [details] [review]
avoid nested extern warning

The attached three patches address gcc warnings that are easy
to avoid. One of them actually is a bug fix (using an uninitialized variable).
Comment 1 Peter Breitenlohner 2008-11-21 04:55:16 UTC
Created attachment 20491 [details] [review]
avoid use of uninitialized variable
Comment 2 Peter Breitenlohner 2008-11-21 04:55:48 UTC
Created attachment 20492 [details] [review]
avoid incompatible pointer type warning
Comment 3 Havoc Pennington 2008-11-26 06:08:02 UTC
Comment on attachment 20491 [details] [review]
avoid use of uninitialized variable

A better fix here would be to set retval=FALSE at the top of the function.
Comment 4 Havoc Pennington 2008-11-26 06:09:44 UTC
First and third patches look correct to me, second with a minor tweak as mentioned.

Thanks for the fixes.
Comment 5 Colin Walters 2009-01-06 13:51:39 UTC
Applied attachment #1 [details] [review] modified with hp's suggestion.  The other two were already committed independently from bug 19196.

Thank you for the patches!

commit 09222cd9209515c3f987f779adb251d0f80d1b70
Author: Peter Breitenlohner <peb@mppmu.mpg.de>
Date:   Tue Jan 6 16:48:39 2009 -0500

    Avoid possible use of uninitialized variable
    
    Signed-off-by: Colin Walters <walters@verbum.org>

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.