Commit f7c53756 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Warning fixes

parent af6723dc
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <vlc_strings.h> #include <vlc_strings.h>
#include <vlc_charset.h> #include <vlc_charset.h>
#include "../libvlc.h"
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
...@@ -574,8 +575,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -574,8 +575,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
#if defined(__APPLE__) || defined(SYS_BEOS) #if defined(__APPLE__) || defined(SYS_BEOS)
if( !val.psz_string && p_vout->p_libvlc->psz_homedir ) if( !val.psz_string && p_vout->p_libvlc->psz_homedir )
{ {
asprintf( &val.psz_string, "%s/Desktop", if( asprintf( &val.psz_string, "%s/Desktop",
p_vout->p_libvlc->psz_homedir ); p_vout->p_libvlc->psz_homedir ) == -1 )
val.psz_string = NULL;
} }
#elif defined(WIN32) && !defined(UNDER_CE) #elif defined(WIN32) && !defined(UNDER_CE)
...@@ -617,12 +619,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -617,12 +619,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
if( p_mypicturesdir == NULL ) if( p_mypicturesdir == NULL )
{ {
asprintf( &val.psz_string, "%s\\" CONFIG_DIR, if( asprintf( &val.psz_string, "%s\\" CONFIG_DIR,
p_vout->p_libvlc->psz_homedir ); p_vout->p_libvlc->psz_homedir ) == -1 )
val.psz_string = NULL;
} }
else else
{ {
asprintf( &val.psz_string, p_mypicturesdir ); if( asprintf( &val.psz_string, p_mypicturesdir ) == -1 )
val.psz_string = NULL;
free( p_mypicturesdir ); free( p_mypicturesdir );
} }
} }
...@@ -630,8 +634,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -630,8 +634,9 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
#else #else
if( !val.psz_string && p_vout->p_libvlc->psz_homedir ) if( !val.psz_string && p_vout->p_libvlc->psz_homedir )
{ {
asprintf( &val.psz_string, "%s/" CONFIG_DIR, if( asprintf( &val.psz_string, "%s/" CONFIG_DIR,
p_vout->p_libvlc->psz_homedir ); p_vout->p_libvlc->psz_homedir ) == -1 )
val.psz_string = NULL;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment