From: Neil Roberts Date: Tue, 15 Feb 2011 12:50:15 +0000 (+0000) Subject: cogl-atlas: Fix a compiler warning when Cogl debug is disabled X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca94d0cc374703d1bba7b45ba31573849943c9b5;p=profile%2Fivi%2Fclutter.git cogl-atlas: Fix a compiler warning when Cogl debug is disabled When Cogl debugging is disabled then the 'waste' variable is not used so it throws a compiler warning. This patch removes the variable and the value is calculated directly as the parameter to COGL_NOTE. --- diff --git a/clutter/cogl/cogl/cogl-atlas.c b/clutter/cogl/cogl/cogl-atlas.c index 60be9e5..6f99f3b 100644 --- a/clutter/cogl/cogl/cogl-atlas.c +++ b/clutter/cogl/cogl/cogl-atlas.c @@ -332,16 +332,15 @@ _cogl_atlas_reserve_space (CoglAtlas *atlas, user_data, &new_position)) { - int waste = - _cogl_rectangle_map_get_remaining_space (atlas->map) * - 100 / (_cogl_rectangle_map_get_width (atlas->map) * - _cogl_rectangle_map_get_height (atlas->map)); COGL_NOTE (ATLAS, "%p: Atlas is %ix%i, has %i textures and is %i%% waste", atlas, _cogl_rectangle_map_get_width (atlas->map), _cogl_rectangle_map_get_height (atlas->map), _cogl_rectangle_map_get_n_rectangles (atlas->map), - waste); + /* waste as a percentage */ + _cogl_rectangle_map_get_remaining_space (atlas->map) * + 100 / (_cogl_rectangle_map_get_width (atlas->map) * + _cogl_rectangle_map_get_height (atlas->map))); atlas->update_position_cb (user_data, atlas->texture,