[systemd-devel] [PATCH 2/3] core: Remove uninitialized warnings from bus-endpoint.c

philippedeswert at gmail.com philippedeswert at gmail.com
Thu Sep 18 08:56:56 PDT 2014


From: Philippe De Swert <philippedeswert at gmail.com>

Gcc is spewing some warnings about uninitialized variables.
Let's get rid of the noise.
---
 src/core/bus-endpoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/bus-endpoint.c b/src/core/bus-endpoint.c
index 1e8f07e..aac540d 100644
--- a/src/core/bus-endpoint.c
+++ b/src/core/bus-endpoint.c
@@ -34,8 +34,8 @@ int bus_endpoint_new(BusEndpoint **ep)
 
 int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access)
 {
-        _cleanup_free_ BusEndpointPolicy *po;
-        _cleanup_free_ char *key;
+        _cleanup_free_ BusEndpointPolicy *po = NULL;
+        _cleanup_free_ char *key = NULL;
         int r;
 
         assert(ep);
-- 
1.8.3.2



More information about the systemd-devel mailing list