Fix build on C89 compilers

-Avoid defining variables in the middle of the block
-Include fallback-c89.c in gtkrevealer.c in place of math.h as
 fallback-c89.c includes math.h itself, and is needed for round()
This commit is contained in:
Chun-wei Fan
2013-05-28 13:36:54 +08:00
parent 8b15b4415c
commit da31982379
2 changed files with 4 additions and 2 deletions

View File

@ -343,8 +343,9 @@ _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager,
if (link)
{
gchar *uri;
bookmark = link->data;
gchar *uri = g_file_get_uri (bookmark->file);
uri = g_file_get_uri (bookmark->file);
g_set_error (error,
GTK_FILE_CHOOSER_ERROR,

View File

@ -26,7 +26,8 @@
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include <math.h>
#include "fallback-c89.c"
/**
* SECTION:gtkrevealer