[PATCH] WaE: crashrep warnings fixed

David Ostrovsky David.Ostrovsky at gmx.de
Sat Apr 21 05:27:43 PDT 2012


---
 crashrep/source/unx/main.cxx |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index f9a6320..d4c17bd 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -592,7 +592,11 @@ static void setup_program_dir( const char* progname )
 
         g_strProgramDir = aDir.substr( 0, pos + 1 );
         aDir.erase( pos );
-        chdir( aDir.c_str() );
+        int ret = chdir( aDir.c_str() );
+        if (!ret)
+        {
+            return;
+        }
     }
 }
 
@@ -1051,7 +1055,11 @@ static bool get_accessibility_state()
 
 int main( int argc, char** argv )
 {
-    freopen( "/dev/null", "w", stderr );
+    FILE *fin = freopen( "/dev/null", "w", stderr );
+    if (!fin) 
+    {
+        return -1;
+    }
 
     setup_program_dir( argv[0] );
 
-- 
1.7.5.4


--------------060301040609030503020007
Content-Type: text/x-patch;
 name="0001-WaE-extensions-warnings-fixed.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-WaE-extensions-warnings-fixed.patch"



More information about the LibreOffice mailing list