From 26a65f4fe410f88c4cf748e4c965833e8fb44e63 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 6 Jun 2014 20:10:36 +0200 Subject: [PATCH] platform: fix compiler warning about uninitialized usage CC nm-linux-platform.lo platform/nm-linux-platform.c: In function '_nm_platform_link_get': platform/nm-linux-platform.c:161:17: error: 'rtnllink' may be used uninitialized in this function [-Werror=maybe-uninitialized] nl_object_put (*object); ^ platform/nm-linux-platform.c:1923:35: note: 'rtnllink' was declared here auto_nl_object struct rtnl_link *rtnllink; ^ cc1: all warnings being treated as errors Signed-off-by: Thomas Haller --- src/platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 6fd6ee5489..1d00ba9ead 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -2050,7 +2050,7 @@ static gboolean _nm_platform_link_get (NMPlatform *platform, int ifindex, NMPlatformLink *link) { NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); - auto_nl_object struct rtnl_link *rtnllink; + auto_nl_object struct rtnl_link *rtnllink = NULL; rtnllink = rtnl_link_get (priv->link_cache, ifindex); if (rtnllink) {