summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-01-12 21:45:33 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-01-12 21:45:33 +0000
commit00bf8be09a333bb7434eeba9e885e6089b6eb5fd (patch)
tree14b0bacc2b276b58c77c0bbb46aa569e39c64d5c
parent[Bug #1650480] pyserial errorhandling in plotter.py tries to iterate over wro... (diff)
downloadinkscape-00bf8be09a333bb7434eeba9e885e6089b6eb5fd.tar.gz
inkscape-00bf8be09a333bb7434eeba9e885e6089b6eb5fd.zip
Use GStatBuf where appropriate to ensure usage of the correct type
(fixes compilation with i686-w64-mingw32) (bzr r15414)
-rw-r--r--src/color-profile.cpp2
-rw-r--r--src/display/cairo-utils.cpp2
-rw-r--r--src/inkscape.cpp2
-rw-r--r--src/io/sys.cpp2
-rw-r--r--src/sp-image.cpp2
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 7a4dcc1cd..cbd3475b4 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -781,7 +781,7 @@ std::vector<std::pair<Glib::ustring, bool> > ColorProfile::getBaseProfileDirs()
static bool isIccFile( gchar const *filepath )
{
bool isIccFile = false;
- struct stat st;
+ GStatBuf st;
if ( g_stat(filepath, &st) == 0 && (st.st_size > 128) ) {
//0-3 == size
//36-39 == 'acsp' 0x61637370
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index 01b0d807c..8045007e7 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -290,7 +290,7 @@ Pixbuf *Pixbuf::create_from_file(std::string const &fn)
if (!g_file_test(fn.c_str(), G_FILE_TEST_EXISTS)) {
return NULL;
}
- struct stat stdir;
+ GStatBuf stdir;
int val = g_stat(fn.c_str(), &stdir);
if (val == 0 && stdir.st_mode & S_IFDIR){
return NULL;
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 2ba85026f..bf694ada7 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -274,7 +274,7 @@ int Application::autosave()
if (doc->isModifiedSinceSave()) {
gchar *oldest_autosave = 0;
const gchar *filename = 0;
- struct stat sb;
+ GStatBuf sb;
time_t min_time = 0;
gint count = 0;
diff --git a/src/io/sys.cpp b/src/io/sys.cpp
index 94175176a..61a6a96f4 100644
--- a/src/io/sys.cpp
+++ b/src/io/sys.cpp
@@ -226,7 +226,7 @@ bool Inkscape::IO::file_is_writable( char const *utf8name)
filename = g_filename_from_utf8 ( utf8name, -1, NULL, NULL, NULL );
}
if ( filename ) {
- struct stat st;
+ GStatBuf st;
if (g_file_test (filename, G_FILE_TEST_EXISTS)){
if (g_lstat (filename, &st) == 0) {
success = ((st.st_mode & S_IWRITE) != 0);
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index aa1dbfe20..1961971cb 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -793,7 +793,7 @@ void sp_image_refresh_if_outdated( SPImage* image )
if ( image->href && image->pixbuf && image->pixbuf->modificationTime()) {
// It *might* change
- struct stat st;
+ GStatBuf st;
memset(&st, 0, sizeof(st));
int val = 0;
if (g_file_test (image->pixbuf->originalPath().c_str(), G_FILE_TEST_EXISTS)){
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index f5450ac9a..92e9ce834 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -554,7 +554,7 @@ bool SVGPreview::set(Glib::ustring &fileName, int dialogType)
Glib::ustring fileNameUtf8 = Glib::filename_to_utf8(fileName);
gchar *fName = const_cast<gchar *>(
fileNameUtf8.c_str()); // const-cast probably not necessary? (not necessary on Windows version of stat())
- struct stat info;
+ GStatBuf info;
if (g_stat(fName, &info)) // stat returns 0 upon success
{
g_warning("SVGPreview::set() : %s : %s", fName, strerror(errno));