From 57c3ecadb85f7995aecf6666c47e2c0036f1d9f6 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 23 Jun 2009 22:11:45 +0000 Subject: [PATCH] * Fixed warning. * Fixed creation of settings file. The second creat() parameter specifies the permission, not the open mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31216 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/magnify/Magnify.cpp | 4 ++-- src/apps/magnify/Magnify.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/magnify/Magnify.cpp b/src/apps/magnify/Magnify.cpp index 3bcb76f73a..f54eccc5b1 100644 --- a/src/apps/magnify/Magnify.cpp +++ b/src/apps/magnify/Magnify.cpp @@ -494,7 +494,7 @@ TWindow::SetPrefs() long ref; path.Append (kPrefsFileName); - if ((ref = creat(path.Path(), O_RDWR)) >= 0) { + if ((ref = creat(path.Path(), S_IRUSR | S_IWUSR)) >= 0) { float version = kCurrentVersion; lseek (ref, 0, SEEK_SET); @@ -1683,7 +1683,7 @@ TMagnify::SaveImage(entry_ref* ref, char* name, bool selectionOnly) void -TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, char* name) const +TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, const char* name) const { int32 bytesPerPixel; const char *kColorSpaceName; diff --git a/src/apps/magnify/Magnify.h b/src/apps/magnify/Magnify.h index ae9d06d8db..c9388dd4b1 100644 --- a/src/apps/magnify/Magnify.h +++ b/src/apps/magnify/Magnify.h @@ -114,7 +114,8 @@ class TMagnify : public BView { void StartSave(); void SaveImage(entry_ref* ref, char* name, bool selectionOnly=false); - void SaveBits(BFile* file, const BBitmap *bitmap, char* name) const; + void SaveBits(BFile* file, const BBitmap *bitmap, + const char* name) const; void EndSave(); private: