core: add some assertions to avoid clang analyzer false positives

This commit is contained in:
Dan Winship 2014-03-04 18:27:31 -05:00
parent d86a61225d
commit 4753dff29e
2 changed files with 4 additions and 0 deletions

View file

@ -66,6 +66,8 @@ translate_mm_error (GError *error)
{
NMDeviceStateReason reason;
g_return_val_if_fail (error != NULL, NM_DEVICE_STATE_REASON_UNKNOWN);
if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_CARRIER))
reason = NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER;
else if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_DIALTONE))

View file

@ -3081,6 +3081,7 @@ _activation_auth_done (NMActiveConnection *active,
error_desc);
}
g_assert (error);
dbus_g_method_return_error (context, error);
_internal_activation_failed (self, active, error->message);
g_object_unref (active);
@ -3227,6 +3228,7 @@ activation_add_done (NMSettings *self,
error = local;
}
g_assert (error);
_internal_activation_failed (info->manager, info->active, error->message);
dbus_g_method_return_error (context, error);
g_clear_error (&local);