mirror of https://github.com/GNOME/gimp.git
libgimpbase, plug-ins: fix all warnings to g_stat() calls.
The second parameter should be GStatBuf*, which will be defined to be the right struct depending on the actual platform. Using `struct stat*` was good on Linux but was outputting warnings on other platforms (at least on Win32).
This commit is contained in:
parent
44d10e458c
commit
6bc6a07b7e
|
@ -1134,11 +1134,11 @@ gimp_path_free (GList *path)
|
|||
gchar *
|
||||
gimp_path_get_user_writable_dir (GList *path)
|
||||
{
|
||||
GList *list;
|
||||
uid_t euid;
|
||||
gid_t egid;
|
||||
struct stat filestat;
|
||||
gint err;
|
||||
GList *list;
|
||||
uid_t euid;
|
||||
gid_t egid;
|
||||
GStatBuf filestat;
|
||||
gint err;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
|
|
|
@ -546,9 +546,9 @@ load_image (const CompressorEntry *compressor,
|
|||
static gboolean
|
||||
valid_file (GFile *file)
|
||||
{
|
||||
gchar *filename;
|
||||
struct stat buf;
|
||||
gboolean valid;
|
||||
gchar *filename;
|
||||
GStatBuf buf;
|
||||
gboolean valid;
|
||||
|
||||
filename = g_file_get_path (file);
|
||||
valid = g_stat (filename, &buf) == 0 && buf.st_size > 0;
|
||||
|
|
|
@ -674,9 +674,9 @@ send_dialog (void)
|
|||
static gboolean
|
||||
valid_file (GFile *file)
|
||||
{
|
||||
gchar *filename;
|
||||
struct stat buf;
|
||||
gboolean valid;
|
||||
gchar *filename;
|
||||
GStatBuf buf;
|
||||
gboolean valid;
|
||||
|
||||
filename = g_file_get_path (file);
|
||||
valid = g_stat (filename, &buf) == 0 && buf.st_size > 0;
|
||||
|
|
|
@ -119,13 +119,13 @@ load_image (GFile *file,
|
|||
gboolean *profile_loaded,
|
||||
GError **load_error)
|
||||
{
|
||||
gchar *filename;
|
||||
FILE *f;
|
||||
struct stat st;
|
||||
PSDimage img_a;
|
||||
PSDlayer **lyr_a;
|
||||
GimpImage *image = NULL;
|
||||
GError *error = NULL;
|
||||
gchar *filename;
|
||||
FILE *f;
|
||||
GStatBuf st;
|
||||
PSDimage img_a;
|
||||
PSDlayer **lyr_a;
|
||||
GimpImage *image = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
filename = g_file_get_path (file);
|
||||
|
||||
|
|
|
@ -61,12 +61,12 @@ load_thumbnail_image (GFile *file,
|
|||
gint *height,
|
||||
GError **load_error)
|
||||
{
|
||||
gchar *filename;
|
||||
FILE *f;
|
||||
struct stat st;
|
||||
PSDimage img_a;
|
||||
GimpImage *image = NULL;
|
||||
GError *error = NULL;
|
||||
gchar *filename;
|
||||
FILE *f;
|
||||
GStatBuf st;
|
||||
PSDimage img_a;
|
||||
GimpImage *image = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
filename = g_file_get_path (file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue