Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
fb8ca39f
Commit
fb8ca39f
authored
Dec 18, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./include/vlc_messages.h: msg_* functions now use the same argument type
checks as printf. Only works with gcc 3.2 it seems.
parent
5fbe1b05
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
16 deletions
+37
-16
configure.ac.in
configure.ac.in
+13
-0
include/vlc_common.h
include/vlc_common.h
+9
-2
include/vlc_messages.h
include/vlc_messages.h
+7
-7
include/vlc_threads_funcs.h
include/vlc_threads_funcs.h
+4
-4
src/misc/messages.c
src/misc/messages.c
+4
-3
No files found.
configure.ac.in
View file @
fb8ca39f
...
...
@@ -663,6 +663,19 @@ if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
[${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
fi
dnl Checks for __attribute__(format()) directive
AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
[ac_cv_c_attribute_format],
[ac_cv_c_attribute_format=no
CFLAGS="${CFLAGS_save} -Werror"
AC_TRY_COMPILE([],
[static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
[ac_cv_c_attribute_format=yes])
CFLAGS="${CFLAGS_save}"])
if test "x${ac_cv_c_attribute_format}" != "xno"; then
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
dnl
dnl Check the CPU
dnl
...
...
include/vlc_common.h
View file @
fb8ca39f
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.4
4 2002/12/14 21:32:41 fenrir
Exp $
* $Id: vlc_common.h,v 1.4
5 2002/12/18 11:47:35 sam
Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -13,7 +13,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -440,6 +440,13 @@ static inline uint64_t U64_AT( void * _p )
# define ntoh64(i) U64_AT(&i)
#endif
/* Format string sanity checks */
#ifdef HAVE_ATTRIBUTE_FORMAT
# define ATTRIBUTE_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
#else
# define ATTRIBUTE_FORMAT(x,y)
#endif
/* Alignment of critical static data structures */
#ifdef ATTRIBUTE_ALIGNED_MAX
# define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
...
...
include/vlc_messages.h
View file @
fb8ca39f
...
...
@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_messages.h,v 1.
7 2002/11/13 15:28:24
sam Exp $
* $Id: vlc_messages.h,v 1.
8 2002/12/18 11:47:35
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -13,7 +13,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -97,11 +97,11 @@ struct msg_subscription_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_EXPORT
(
void
,
__msg_Generic
,
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
void
,
__msg_Info
,
(
void
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
void
,
__msg_Err
,
(
void
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
void
,
__msg_Warn
,
(
void
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
void
,
__msg_Dbg
,
(
void
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
void
,
__msg_Generic
,
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
4
,
5
)
);
VLC_EXPORT
(
void
,
__msg_Info
,
(
void
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Err
,
(
void
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Warn
,
(
void
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Dbg
,
(
void
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
#ifdef HAVE_VARIADIC_MACROS
...
...
include/vlc_threads_funcs.h
View file @
fb8ca39f
...
...
@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads_funcs.h,v 1.1
0 2002/12/08 00:41:06 massiot
Exp $
* $Id: vlc_threads_funcs.h,v 1.1
1 2002/12/18 11:47:35 sam
Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -14,7 +14,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -618,7 +618,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
{
msg_Warn
(
p_condvar
->
p_this
,
"thread %d: possible deadlock detected "
"in cond_wait at %s:%d (%s)"
,
pthread_self
(),
"in cond_wait at %s:%d (%s)"
,
(
int
)
pthread_self
(),
psz_file
,
i_line
,
strerror
(
i_result
)
);
}
else
break
;
...
...
@@ -702,4 +702,4 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
* vlc_thread_join: wait until a thread exits
*****************************************************************************/
#define vlc_thread_join( P_THIS ) \
__vlc_thread_join( VLC_OBJECT(P_THIS), __FILE__, __LINE__ )
__vlc_thread_join( VLC_OBJECT(P_THIS), __FILE__, __LINE__ )
src/misc/messages.c
View file @
fb8ca39f
...
...
@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: messages.c,v 1.2
5 2002/11/25 12:08:58
sam Exp $
* $Id: messages.c,v 1.2
6 2002/12/18 11:47:35
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -13,7 +13,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
...
@@ -209,7 +209,7 @@ void __msg_Unsubscribe( vlc_object_t *p_this, msg_subscription_t *p_sub )
* These functions queue a message for later printing.
*****************************************************************************/
void
__msg_Generic
(
vlc_object_t
*
p_this
,
int
i_type
,
const
char
*
psz_module
,
const
char
*
psz_format
,
...
)
const
char
*
psz_format
,
...
)
ATTRIBUTE_FORMAT
(
4
,
5
)
{
va_list
args
;
...
...
@@ -221,6 +221,7 @@ void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
/* Generic functions used when variadic macros are not available. */
#define DECLARE_MSG_FN( FN_NAME, FN_TYPE ) \
void FN_NAME( void *p_this, const char *psz_format, ... ) \
ATTRIBUTE_FORMAT( 2, 3 ) \
{ \
va_list args; \
va_start( args, psz_format ); \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment