Remove some compiler warnings

Some issues found using clang as the compiler.
This commit is contained in:
Emmanuele Bassi 2011-10-11 23:42:23 +01:00
parent 2ede853ea3
commit 193b345786
5 changed files with 11 additions and 11 deletions

View File

@ -684,7 +684,7 @@ clutter_context_get_pango_fontmap (void)
static ClutterTextDirection static ClutterTextDirection
clutter_get_text_direction (void) clutter_get_text_direction (void)
{ {
PangoDirection dir = PANGO_DIRECTION_LTR; ClutterTextDirection dir = CLUTTER_TEXT_DIRECTION_LTR;
const gchar *direction; const gchar *direction;
direction = g_getenv ("CLUTTER_TEXT_DIRECTION"); direction = g_getenv ("CLUTTER_TEXT_DIRECTION");

View File

@ -232,7 +232,7 @@ clutter_model_real_get_column_type (ClutterModel *model,
{ {
ClutterModelPrivate *priv = model->priv; 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 G_TYPE_INVALID;
return priv->column_types[column]; return priv->column_types[column];
@ -244,7 +244,7 @@ clutter_model_real_get_column_name (ClutterModel *model,
{ {
ClutterModelPrivate *priv = model->priv; ClutterModelPrivate *priv = model->priv;
if (column < 0 || column >= clutter_model_get_n_columns (model)) if (column >= clutter_model_get_n_columns (model))
return NULL; return NULL;
if (priv->column_names && priv->column_names[column]) 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); 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); g_warning ("%s: Invalid column id value %d\n", G_STRLOC, column);
return NULL; 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); 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); g_warning ("%s: Invalid column id value %d\n", G_STRLOC, column);
return G_TYPE_INVALID; return G_TYPE_INVALID;
@ -2003,7 +2003,7 @@ clutter_model_iter_set_internal_valist (ClutterModelIter *iter,
gchar *error = NULL; gchar *error = NULL;
GType col_type; 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 " g_warning ("%s: Invalid column number %d added to iter "
"(remember to end you list of columns with a -1)", "(remember to end you list of columns with a -1)",
@ -2169,7 +2169,7 @@ clutter_model_iter_get_valist (ClutterModelIter *iter,
gchar *error = NULL; gchar *error = NULL;
GType col_type; 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 " g_warning ("%s: Invalid column number %d added to iter "
"(remember to end you list of columns with a -1)", "(remember to end you list of columns with a -1)",

View File

@ -1937,7 +1937,7 @@ void
_clutter_script_construct_object (ClutterScript *script, _clutter_script_construct_object (ClutterScript *script,
ObjectInfo *oinfo) ObjectInfo *oinfo)
{ {
GArray *params; GArray *params = NULL;
guint i; guint i;
/* we have completely updated the object */ /* we have completely updated the object */

View File

@ -524,8 +524,8 @@ select_thread_start_poll (GPollFD *ufds,
have_new_pollfds = TRUE; have_new_pollfds = TRUE;
else else
{ {
if (!((nfds == 1 && poll_fd_index < 0 && g_thread_supported ()) || if (!((nfds == 1 && poll_fd_index < 0) ||
(nfds == 2 && poll_fd_index >= 0 && g_thread_supported ()))) (nfds == 2 && poll_fd_index >= 0)))
select_thread_set_state (POLLING_RESTART); select_thread_set_state (POLLING_RESTART);
} }
} }

View File

@ -135,7 +135,7 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
- (void)windowDidChangeScreen:(NSNotification *)notification - (void)windowDidChangeScreen:(NSNotification *)notification
{ {
clutter_redraw(CLUTTER_STAGE(self->stage_osx->wrapper)); clutter_stage_ensure_redraw (CLUTTER_STAGE(self->stage_osx->wrapper));
} }
@end @end