Bug 37062 - fix warnings provoked by gcc 4.6
Summary: fix warnings provoked by gcc 4.6
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: low trivial
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://cgit.collabora.co.uk/git/user/...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-05-10 03:34 UTC by Simon McVittie
Modified: 2011-05-12 01:39 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/6] bash completion helper: remove unused variable 'prev', and simplify (1.22 KB, patch)
2011-05-10 03:35 UTC, Simon McVittie
Details | Splinter Review
[PATCH 2/6] demarshal_static_variant: remove useless call to dbus_message_iter_get_arg_type (891 bytes, patch)
2011-05-10 03:35 UTC, Simon McVittie
Details | Splinter Review
[PATCH 3/6] marshal_map, marshal_struct: remove unused variable ret (1.30 KB, patch)
2011-05-10 03:35 UTC, Simon McVittie
Details | Splinter Review
[PATCH 4/6] marshal_collection_array: remove set-but-unused variable elt_size (1.00 KB, patch)
2011-05-10 03:36 UTC, Simon McVittie
Details | Splinter Review
[PATCH 5/6] marshal_collection_array: statically assert that size conversion is not needed (1.38 KB, patch)
2011-05-10 03:36 UTC, Simon McVittie
Details | Splinter Review
[PATCH 6/6] test-service: ignore result of dbus_bus_request_name since we look at the error instead (1.07 KB, patch)
2011-05-10 03:36 UTC, Simon McVittie
Details | Splinter Review

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.