]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/theme_loader.cpp
Introduce setLayoutMargins for layout margins difference between Qt4.2 and Qt4.3
[vlc] / modules / gui / skins2 / src / theme_loader.cpp
index a304ed491c356b04400a15032a7a29b6b20ee4bc..03fa1577eca01f17e27eb8e7a52096debcb09bfd 100644 (file)
@@ -52,7 +52,7 @@
 #if defined( HAVE_ZLIB_H )
 #   include <zlib.h>
 #   include <errno.h>
-int gzopen_frontend ( char *pathname, int oflags, int mode );
+int gzopen_frontend ( const char *pathname, int oflags, int mode );
 int gzclose_frontend( int );
 int gzread_frontend ( int, void *, size_t );
 int gzwrite_frontend( int, const void *, size_t );
@@ -114,7 +114,7 @@ bool ThemeLoader::load( const string &fileName )
         // Show the windows
         pNewTheme->getWindowManager().showAll( true );
     }
-    if( skin_last ) free( skin_last );
+    free( skin_last );
 
     // The new theme cannot embed a video output yet
     VlcProc::instance( getIntf() )->dropVout();
@@ -632,6 +632,7 @@ int tar_extract_all( TAR *t, char *prefix )
                 {
                     fprintf( stderr, "error writing %s skipping...\n", fname );
                     fclose( outfile );
+                    outfile = NULL;
                     unlink( fname );
                 }
             }
@@ -738,9 +739,9 @@ int makedir( const char *newdir )
 static int currentGzFd = -1;
 static void * currentGzVp = NULL;
 
-int gzopen_frontend( char *pathname, int oflags, int mode )
+int gzopen_frontend( const char *pathname, int oflags, int mode )
 {
-    char *gzflags;
+    const char *gzflags;
     gzFile gzf;
 
     switch( oflags )