[vlc-devel] commit: Use %s even if all strings are currently free of percent characters ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Aug 13 20:45:23 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Aug 13 21:41:48 2008 +0300| [915ba6e04d51ff5502b3df87735af4172bcfdfa6] | committer: Rémi Denis-Courmont 

Use %s even if all strings are currently free of percent characters

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=915ba6e04d51ff5502b3df87735af4172bcfdfa6
---

 include/vlc_demux.h               |    2 +-
 include/vlc_interface.h           |    2 +-
 modules/gui/skins2/src/logger.cpp |    4 ++--
 src/libvlc.c                      |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index 2790950..5b5c582 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -174,7 +174,7 @@ static inline bool demux_IsForced( demux_t *p_demux, const char *psz_name )
 
 #define STANDARD_DEMUX_INIT_MSG( msg ) do { \
     DEMUX_INIT_COMMON();                    \
-    msg_Dbg( p_demux, msg ); } while(0)
+    msg_Dbg( p_demux, "%s", msg ); } while(0)
 
 #define DEMUX_BY_EXTENSION( ext ) \
     demux_t *p_demux = (demux_t *)p_this; \
diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index 5c13eaa..0fb7b6c 100644
--- a/include/vlc_interface.h
+++ b/include/vlc_interface.h
@@ -132,7 +132,7 @@ VLC_EXPORT( int, __intf_Eject, ( vlc_object_t *, const char * ) );
          freopen( "CONOUT$", "w", stderr ); \
          freopen( "CONIN$", "r", stdin ); \
          } \
-         msg_Info( p_intf, COPYRIGHT_MESSAGE ); \
+         msg_Info( p_intf, "%s", COPYRIGHT_MESSAGE ); \
          msg_Info( p_intf, _("\nWarning: if you can't access the GUI " \
                              "anymore, open a command-line window, go to the " \
                              "directory where you installed VLC and run " \
diff --git a/modules/gui/skins2/src/logger.cpp b/modules/gui/skins2/src/logger.cpp
index 068d137..b0b0b22 100644
--- a/modules/gui/skins2/src/logger.cpp
+++ b/modules/gui/skins2/src/logger.cpp
@@ -62,12 +62,12 @@ void Logger::destroy( intf_thread_t *pIntf )
 
 void Logger::error( const string &rMsg )
 {
-    msg_Err( getIntf(), rMsg.c_str() );
+    msg_Err( getIntf(), "%s", rMsg.c_str() );
 }
 
 
 void Logger::warn( const string &rMsg )
 {
-    msg_Warn( getIntf(), rMsg.c_str() );
+    msg_Warn( getIntf(), "%s", rMsg.c_str() );
 }
 
diff --git a/src/libvlc.c b/src/libvlc.c
index f982be8..8c1f907 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -227,7 +227,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
 #endif
 
     /* Announce who we are - Do it only for first instance ? */
-    msg_Dbg( p_libvlc, COPYRIGHT_MESSAGE );
+    msg_Dbg( p_libvlc, "%s", COPYRIGHT_MESSAGE );
     msg_Dbg( p_libvlc, "libvlc was configured with %s", CONFIGURE_LINE );
 
     /* Initialize mutexes */




More information about the vlc-devel mailing list