Bug 37062

Summary: fix warnings provoked by gcc 4.6
Product: dbus Reporter: Simon McVittie <smcv>
Component: GLibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: trivial    
Priority: low CC: rob.taylor, walters
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.collabora.co.uk/git/user/smcv/dbus-glib-smcv.git/log/?h=warnings
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH 1/6] bash completion helper: remove unused variable 'prev', and simplify
[PATCH 2/6] demarshal_static_variant: remove useless call to dbus_message_iter_get_arg_type
[PATCH 3/6] marshal_map, marshal_struct: remove unused variable ret
[PATCH 4/6] marshal_collection_array: remove set-but-unused variable elt_size
[PATCH 5/6] marshal_collection_array: statically assert that size conversion is not needed
[PATCH 6/6] test-service: ignore result of dbus_bus_request_name since we look at the error instead

Description Simon McVittie 2011-05-10 03:34:17 UTC
gcc 4.6 warns about set-but-unused variables. Let's bin them.
Comment 1 Simon McVittie 2011-05-10 03:35:10 UTC
Created attachment 46532 [details] [review]
[PATCH 1/6] bash completion helper: remove unused variable 'prev',  and simplify

gcc 4.6 warns about this.
Comment 2 Simon McVittie 2011-05-10 03:35:29 UTC
Created attachment 46533 [details] [review]
[PATCH 2/6] demarshal_static_variant: remove useless call to  dbus_message_iter_get_arg_type

gcc 4.6 warns about this.
Comment 3 Simon McVittie 2011-05-10 03:35:47 UTC
Created attachment 46534 [details] [review]
[PATCH 3/6] marshal_map, marshal_struct: remove unused variable ret

gcc 4.6 warns about these.
Comment 4 Simon McVittie 2011-05-10 03:36:04 UTC
Created attachment 46535 [details] [review]
[PATCH 4/6] marshal_collection_array: remove set-but-unused variable  elt_size

gcc 4.6 warns about these.
Comment 5 Simon McVittie 2011-05-10 03:36:23 UTC
Created attachment 46536 [details] [review]
[PATCH 5/6] marshal_collection_array: statically assert that size  conversion is not needed

Previously, the function blindly assumed this without a check.
Comment 6 Simon McVittie 2011-05-10 03:36:43 UTC
Created attachment 46537 [details] [review]
[PATCH 6/6] test-service: ignore result of dbus_bus_request_name  since we look at the error instead

gcc 4.6 warns for this usage.
Comment 7 Simon McVittie 2011-05-10 03:37:50 UTC
The branch from Bug #10890 fixes some other gcc 4.6 warnings (missing prototypes for "regression tests" that didn't actually test anything, by deleting those functions).
Comment 8 Colin Walters 2011-05-11 14:15:12 UTC
Review of attachment 46532 [details] [review]:

Looks good.
Comment 9 Colin Walters 2011-05-11 14:18:47 UTC
Review of attachment 46536 [details] [review]:

Looks good.
Comment 10 Colin Walters 2011-05-11 14:19:27 UTC
All of these patches sound fine to me.
Comment 11 Simon McVittie 2011-05-12 01:39:47 UTC
Thanks, fixed in master for 0.94.

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.