platform: tests: silence compilation warning

src/platform/tests/test-common.c: In function ‘_ip4_route_get’:
./src/platform/nmp-object.h:336:18: error: ‘o’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return obj ? obj->_class->obj_type : NMP_OBJECT_TYPE_UNKNOWN;
               ~~~^~~~~~~~
src/platform/tests/test-common.c:308:19: note: ‘o’ was declared here
  const NMPObject *o;
                   ^

Fixes: cdd8c65799
This commit is contained in:
Beniamino Galvani 2017-08-28 10:39:23 +02:00
parent 67bfdbfc91
commit f42c7ba2b3

View file

@ -305,7 +305,7 @@ _ip4_route_get (NMPlatform *platform,
{
NMDedupMultiIter iter;
NMPLookup lookup;
const NMPObject *o;
const NMPObject *o = NULL;
guint c;
const NMPlatformIP4Route *r = NULL;
@ -409,7 +409,7 @@ _ip6_route_get (NMPlatform *platform,
{
NMDedupMultiIter iter;
NMPLookup lookup;
const NMPObject *o;
const NMPObject *o = NULL;
guint c;
const NMPlatformIP6Route *r = NULL;