mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Remove some compiler warnings
Some issues found using clang as the compiler.
This commit is contained in:
parent
2ede853ea3
commit
193b345786
@ -684,7 +684,7 @@ clutter_context_get_pango_fontmap (void)
|
||||
static ClutterTextDirection
|
||||
clutter_get_text_direction (void)
|
||||
{
|
||||
PangoDirection dir = PANGO_DIRECTION_LTR;
|
||||
ClutterTextDirection dir = CLUTTER_TEXT_DIRECTION_LTR;
|
||||
const gchar *direction;
|
||||
|
||||
direction = g_getenv ("CLUTTER_TEXT_DIRECTION");
|
||||
|
@ -232,7 +232,7 @@ clutter_model_real_get_column_type (ClutterModel *model,
|
||||
{
|
||||
ClutterModelPrivate *priv = model->priv;
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
return G_TYPE_INVALID;
|
||||
|
||||
return priv->column_types[column];
|
||||
@ -244,7 +244,7 @@ clutter_model_real_get_column_name (ClutterModel *model,
|
||||
{
|
||||
ClutterModelPrivate *priv = model->priv;
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
return NULL;
|
||||
|
||||
if (priv->column_names && priv->column_names[column])
|
||||
@ -1390,7 +1390,7 @@ clutter_model_get_column_name (ClutterModel *model,
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MODEL (model), NULL);
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
{
|
||||
g_warning ("%s: Invalid column id value %d\n", G_STRLOC, column);
|
||||
return NULL;
|
||||
@ -1422,7 +1422,7 @@ clutter_model_get_column_type (ClutterModel *model,
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_MODEL (model), G_TYPE_INVALID);
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
{
|
||||
g_warning ("%s: Invalid column id value %d\n", G_STRLOC, column);
|
||||
return G_TYPE_INVALID;
|
||||
@ -2003,7 +2003,7 @@ clutter_model_iter_set_internal_valist (ClutterModelIter *iter,
|
||||
gchar *error = NULL;
|
||||
GType col_type;
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
{
|
||||
g_warning ("%s: Invalid column number %d added to iter "
|
||||
"(remember to end you list of columns with a -1)",
|
||||
@ -2169,7 +2169,7 @@ clutter_model_iter_get_valist (ClutterModelIter *iter,
|
||||
gchar *error = NULL;
|
||||
GType col_type;
|
||||
|
||||
if (column < 0 || column >= clutter_model_get_n_columns (model))
|
||||
if (column >= clutter_model_get_n_columns (model))
|
||||
{
|
||||
g_warning ("%s: Invalid column number %d added to iter "
|
||||
"(remember to end you list of columns with a -1)",
|
||||
|
@ -1937,7 +1937,7 @@ void
|
||||
_clutter_script_construct_object (ClutterScript *script,
|
||||
ObjectInfo *oinfo)
|
||||
{
|
||||
GArray *params;
|
||||
GArray *params = NULL;
|
||||
guint i;
|
||||
|
||||
/* we have completely updated the object */
|
||||
|
@ -524,8 +524,8 @@ select_thread_start_poll (GPollFD *ufds,
|
||||
have_new_pollfds = TRUE;
|
||||
else
|
||||
{
|
||||
if (!((nfds == 1 && poll_fd_index < 0 && g_thread_supported ()) ||
|
||||
(nfds == 2 && poll_fd_index >= 0 && g_thread_supported ())))
|
||||
if (!((nfds == 1 && poll_fd_index < 0) ||
|
||||
(nfds == 2 && poll_fd_index >= 0)))
|
||||
select_thread_set_state (POLLING_RESTART);
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
|
||||
|
||||
- (void)windowDidChangeScreen:(NSNotification *)notification
|
||||
{
|
||||
clutter_redraw(CLUTTER_STAGE(self->stage_osx->wrapper));
|
||||
clutter_stage_ensure_redraw (CLUTTER_STAGE(self->stage_osx->wrapper));
|
||||
}
|
||||
@end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user