mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 20:00:09 +01:00
platform: fix warning warning about unused variable
The variable is not actually unused, because it is used
to free the nl_object instance.
clang warns:
make[4]: Entering directory `./NetworkManager/src'
CC nm-linux-platform.lo
platform/nm-linux-platform.c:1746:35: error: unused variable 'obj_cleanup' [-Werror,-Wunused-variable]
auto_nl_object struct nl_object *obj_cleanup = obj;
^
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
657ea51008
commit
971dfc773f
1 changed files with 10 additions and 7 deletions
|
|
@ -1740,15 +1740,14 @@ add_object (NMPlatform *platform, struct nl_object *obj)
|
|||
|
||||
/* Decreases the reference count if @obj for convenience */
|
||||
static gboolean
|
||||
delete_object (NMPlatform *platform, struct nl_object *obj, gboolean do_refresh_object)
|
||||
delete_object (NMPlatform *platform, struct nl_object *object, gboolean do_refresh_object)
|
||||
{
|
||||
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
|
||||
auto_nl_object struct nl_object *obj_cleanup = obj;
|
||||
struct nl_object *object = obj;
|
||||
int object_type;
|
||||
int nle;
|
||||
gboolean result = FALSE;
|
||||
|
||||
object_type = object_type_from_nl_object (obj);
|
||||
object_type = object_type_from_nl_object (object);
|
||||
g_return_val_if_fail (object_type != OBJECT_TYPE_UNKNOWN, FALSE);
|
||||
|
||||
switch (object_type) {
|
||||
|
|
@ -1791,14 +1790,18 @@ delete_object (NMPlatform *platform, struct nl_object *obj, gboolean do_refresh_
|
|||
goto DEFAULT;
|
||||
DEFAULT:
|
||||
default:
|
||||
error ("Netlink error deleting %s: %s (%d)", to_string_object (platform, obj), nl_geterror (nle), nle);
|
||||
return FALSE;
|
||||
error ("Netlink error deleting %s: %s (%d)", to_string_object (platform, object), nl_geterror (nle), nle);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (do_refresh_object)
|
||||
refresh_object (platform, object, TRUE, NM_PLATFORM_REASON_INTERNAL);
|
||||
|
||||
return TRUE;
|
||||
result = TRUE;
|
||||
|
||||
out:
|
||||
nl_object_put (object);
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue