all: explicitly ignore return values

Coverity warns that usually we check for the return value.
This commit is contained in:
Thomas Haller
2016-03-04 09:02:45 +01:00
parent 9f16498938
commit d17aedf91f
3 changed files with 4 additions and 3 deletions

View File

@@ -203,7 +203,7 @@ get_properties_cb (GObject *proxy, GAsyncResult *result, gpointer user_data)
properties = g_variant_get_child_value (ret, 0);
g_variant_lookup (properties, "Address", "s", &priv->address);
(void) g_variant_lookup (properties, "Address", "s", &priv->address);
if (g_variant_lookup (properties, "Devices", "^ao", &devices)) {
for (i = 0; devices[i]; i++)
device_created (priv->proxy, devices[i], self);

View File

@@ -454,10 +454,11 @@ nm_utils_modprobe (GError **error, gboolean suppress_error_logging, const char *
nm_log (llevel, LOGD_CORE, "modprobe: '%s' failed: %s", ARGV_TO_STR (argv), local->message);
g_propagate_error (error, local);
return -1;
} else if (exit_status != 0)
} else if (exit_status != 0) {
nm_log (llevel, LOGD_CORE, "modprobe: '%s' exited with error %d%s%s%s%s%s%s", ARGV_TO_STR (argv), exit_status,
std_out&&*std_out ? " (" : "", std_out&&*std_out ? _trunk_first_line (std_out) : "", std_out&&*std_out ? ")" : "",
std_err&&*std_err ? " (" : "", std_err&&*std_err ? _trunk_first_line (std_err) : "", std_err&&*std_err ? ")" : "");
}
return exit_status;
}

View File

@@ -3925,7 +3925,7 @@ link_add (NMPlatform *platform,
* bond0 automatically.
*/
if (!g_file_test ("/sys/class/net/bonding_masters", G_FILE_TEST_EXISTS))
nm_utils_modprobe (NULL, TRUE, "bonding", "max_bonds=0", NULL);
(void) nm_utils_modprobe (NULL, TRUE, "bonding", "max_bonds=0", NULL);
}
_LOGD ("link: add link '%s' of type '%s' (%d)",