On Fri, 13.06.14 21:04, Thomas H.P. Andersen (pho...@gmail.com) wrote: > From: Thomas Hindoe Paaboel Andersen <pho...@gmail.com> > > Removes _cleanup_dhcp_lease_free_. While the automatic cleanup > functions are great to have this one is never used and causes > a warning in clang.
Applied! Thanks! > -DEFINE_TRIVIAL_CLEANUP_FUNC(DHCPLease*, dhcp_lease_free); > -#define _cleanup_dhcp_lease_free_ _cleanup_(dhcp_lease_freep) > - BTW, taking the opportunity for a public service announcement: When I added the _cleanup_() macros I never intended that every single user of it would #define its own _cleanup_foobar_() macro. I just did that for the most common ones, since I didn't want to make visible the fact that internally this requires the indirection via the -p function that DEFINE_TRIVIAL_CLEANUP_FUNC() defines. Not that it really matters, but for cleanup handlers that are never exported in a header file I would probably avoid defining a new macro, and just use DEFINE_TRIVIAL_CLEANUP_FUNC where necesary, and then directly declare my variables with naked _cleanup_() _cleanup_(dhcp_lease_freep) DHCPLease *lease; I mean, if this is not exposed, then there's no need to hide the indirection via the -p function, if you follow what i mean. That all said, this really doesn't matter, so if you feel like defining macros each time go ahead, i won't stop you... ;-) Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel