Description
Simon McVittie
2011-08-02 05:03:14 UTC
Created attachment 49828 [details] [review] _dbus_string_append_unichar, _dbus_string_get_unichar: remove These are unused (except by their regression test!) and not visible to external callers. Created attachment 49829 [details] [review] _dbus_string_append_double, _dbus_string_parse_double: remove They're unused, except by their own regression tests. Created attachment 49830 [details] [review] _dbus_getgid: remove, unused Created attachment 49831 [details] [review] Remove unused _dbus_string_append_4_aligned, _dbus_string_append_8_aligned Created attachment 49832 [details] [review] _dbus_header_field_to_string: remove, unused Created attachment 49833 [details] [review] _dbus_list_insert_before: remove, unused Created attachment 49834 [details] [review] _dbus_list_pop_last_link: remove, unused Created attachment 49835 [details] [review] DBUS_HASH_TWO_STRINGS, DBUS_HASH_POINTER: remove, unused Created attachment 49836 [details] [review] _dbus_connection_queue_received_message: remove, unused All look good to me. (I have some doubts though that anybody would look for these bits in the git history though later on, but that shouldn't stop us from deleting dead code.) (As a side note, how did you determine the dead code? Any tool you can recommend?) (In reply to comment #10) > (As a side note, how did you determine the dead code? Any tool you can recommend?) In this particular case I determined it by looking for things that were #ifdef DBUS_BUILD_TESTS, but were not actually tests. In general I use `git grep` and intuition - "does this function look hopelessly obscure? is it interfering with maintenance? let's see if we can delete it". Created attachment 56869 [details] [review] [1/3] _dbus_list_pop_last_link: remove, unused --- With some changes to the test-case to avoid a gcc "assigned but unused" warning. Created attachment 56870 [details] [review] [2/3] _dbus_string_append_unichar, _dbus_string_get_unichar: remove These are unused (except by their regression test!) and not visible to external callers. --- Now without unused variables in the test. Created attachment 56871 [details] [review] [3/3] _dbus_string_append_double, _dbus_string_parse_double: remove They're unused, except by their own regression tests. ---- Now without unused variables. (In reply to comment #10) > All look good to me. Thanks, I applied the ones that didn't cause new compiler warnings when I rebased them, and fixed the three that did (see attached). (In reply to comment #15) > (In reply to comment #10) > > All look good to me. > > Thanks, I applied the ones that didn't cause new compiler warnings when I rebased them, and fixed the three that did (see attached). These look good to me, still. Fixed in git for 1.5.10, thanks for reviewing |
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.