Skip to content

Commit

Permalink
Merge pull request #15 from rufferson/master
Browse files Browse the repository at this point in the history
Small fixes: fall-through, leaks, casts
  • Loading branch information
rufferson authored Dec 5, 2020
2 parents cb02444 + 187b196 commit 7121dbf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/gibber/gibber-fd-transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ _channel_io_in (GIOChannel *source, GIOCondition condition, gpointer data)
break;
case GIBBER_FD_IO_RESULT_ERROR:
gibber_transport_emit_error (GIBBER_TRANSPORT(self), error);
/* Deliberately falling through */
/* Intentional fall-through */
case GIBBER_FD_IO_RESULT_EOF:
DEBUG("Failed to read from the transport, closing..");
_do_disconnect (self);
Expand Down
1 change: 1 addition & 0 deletions src/auth-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ gabble_auth_manager_start_auth_cb (GObject *channel,
self->priv->server,
self->priv->session_id,
gabble_auth_manager_start_parent_cb, user_data);
wocky_auth_registry_start_data_free (start_data);
/* we've transferred ownership of the result */
goto finally;
}
Expand Down
2 changes: 1 addition & 1 deletion src/call-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ _endpoint_state_changed_cb (

/* We only care about connecting RTP, RTCP is optional */
state = tp_call_stream_endpoint_get_state (endpoint, 1);
wocky_jingle_content_set_transport_state (content, state);
wocky_jingle_content_set_transport_state (content, (WockyJingleTransportState) state);
}

static TpCallStreamEndpoint *
Expand Down
2 changes: 1 addition & 1 deletion src/gtalk-file-collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ content_new_remote_candidates_cb (WockyJingleContent *content,
NICE_CANDIDATE_TYPE_RELAYED);


cand->transport = WOCKY_JINGLE_TRANSPORT_PROTOCOL_UDP;
cand->transport = (NiceCandidateTransport) WOCKY_JINGLE_TRANSPORT_PROTOCOL_UDP;
nice_address_init (&cand->addr);

if (!nice_address_set_from_string (&cand->addr, candidate->address))
Expand Down
2 changes: 1 addition & 1 deletion src/search-channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,8 @@ gabble_search_channel_stop (TpSvcChannelTypeContactSearch *self,

change_search_state (chan,
TP_CHANNEL_CONTACT_SEARCH_STATE_FAILED, &e);
/* Deliberately falling through to return from the method: */
}
/* Intentional fall-through */
case TP_CHANNEL_CONTACT_SEARCH_STATE_COMPLETED:
case TP_CHANNEL_CONTACT_SEARCH_STATE_FAILED:
tp_svc_channel_type_contact_search_return_from_stop (context);
Expand Down
1 change: 1 addition & 0 deletions src/server-tls-channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ gabble_server_tls_channel_constructed (GObject *object)
self->priv->server_cert_path = cert_object_path;

DEBUG ("Server TLS channel constructed at %s", path);
g_ptr_array_unref (certificates);
}

static void
Expand Down
3 changes: 2 additions & 1 deletion src/vcard-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,8 @@ gabble_vcard_manager_edit_info_new (const gchar *element_name,
info->new_alias = g_strdup (element_value);
element_value = NULL;

/* deliberate fall-through to check the varargs... */
/* Intentional fall-through */
/* to check the varargs... */
case GABBLE_VCARD_EDIT_DELETE:
case GABBLE_VCARD_EDIT_CLEAR:
{
Expand Down

0 comments on commit 7121dbf

Please sign in to comment.