Commit d1c0b836 authored by Sam Hocevar's avatar Sam Hocevar

* include/vlc_common.h:

    + Introduced intptr_t and uintptr_t.
  * Fixed compilation warnings here and there.
parent caa12e0a
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.93 2003/12/03 21:50:49 sigmunau Exp $ * $Id: vlc_common.h,v 1.94 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -93,6 +93,8 @@ ...@@ -93,6 +93,8 @@
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
typedef signed long long int64_t; typedef signed long long int64_t;
# endif # endif
typedef uint32_t uintptr_t;
typedef int32_t intptr_t;
#endif #endif
typedef uint8_t byte_t; typedef uint8_t byte_t;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* float32tos16.c : converter from float32 to signed 16 bits integer * float32tos16.c : converter from float32 to signed 16 bits integer
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: float32tos16.c,v 1.13 2003/10/25 00:49:13 sam Exp $ * $Id: float32tos16.c,v 1.14 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -94,7 +94,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -94,7 +94,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* This is walken's trick based on IEEE float format. */ /* This is walken's trick based on IEEE float format. */
float f_in = *p_in + 384.0; float f_in = *p_in + 384.0;
int32_t i_in; int32_t i_in;
i_in = *(int32_t *)&f_in; i_in = *(int32_t *)(intptr_t)&f_in;
if ( i_in > 0x43c07fff ) *p_out = 32767; if ( i_in > 0x43c07fff ) *p_out = 32767;
else if ( i_in < 0x43bf8000 ) *p_out = -32768; else if ( i_in < 0x43bf8000 ) *p_out = -32768;
else *p_out = i_in - 0x43c00000; else *p_out = i_in - 0x43c00000;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* s16tofloat32.c : converter from signed 16 bits integer to float32 * s16tofloat32.c : converter from signed 16 bits integer to float32
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: s16tofloat32.c,v 1.6 2003/10/25 00:49:13 sam Exp $ * $Id: s16tofloat32.c,v 1.7 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -96,7 +96,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -96,7 +96,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
* this takes 16 seconds to perform one billion conversions, instead * this takes 16 seconds to perform one billion conversions, instead
* of 19 seconds for the above division. */ * of 19 seconds for the above division. */
int32_t i_out = *p_in + 0x43c00000; int32_t i_out = *p_in + 0x43c00000;
float f_out = *(float *)&i_out; float f_out = *(float *)(intptr_t)&i_out;
*p_out = f_out - 384.0; *p_out = f_out - 384.0;
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer * mkv.cpp : matroska demuxer
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: mkv.cpp,v 1.48 2003/12/02 01:54:30 rocky Exp $ * $Id: mkv.cpp,v 1.49 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -2173,7 +2173,7 @@ static void InformationsCreate( input_thread_t *p_input ) ...@@ -2173,7 +2173,7 @@ static void InformationsCreate( input_thread_t *p_input )
{ {
char psz_buffer[MSTRTIME_MAX_SIZE]; char psz_buffer[MSTRTIME_MAX_SIZE];
input_AddInfo( p_cat, _("Duration"), input_AddInfo( p_cat, _("Duration"),
msecstotimestr( psz_buffer, p_sys->f_duration ) ); msecstotimestr( psz_buffer, (int)p_sys->f_duration ) );
} }
if( p_sys->psz_title ) if( p_sys->psz_title )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* kde.cpp : KDE plugin for vlc * kde.cpp : KDE plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: kde.cpp,v 1.12 2003/08/21 16:59:35 hartman Exp $ * $Id: kde.cpp,v 1.13 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001 * Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001
* *
...@@ -50,7 +50,7 @@ static void run(intf_thread_t *p_intf); ...@@ -50,7 +50,7 @@ static void run(intf_thread_t *p_intf);
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); vlc_module_begin();
int i = getenv( "DISPLAY" ) == NULL ? 8 : 85; /* int i = getenv( "DISPLAY" ) == NULL ? 8 : 85; */
add_category_hint( "kde", NULL, VLC_TRUE ); add_category_hint( "kde", NULL, VLC_TRUE );
add_file( "kde-uirc", DATA_PATH "/ui.rc", NULL, N_( "path to ui.rc file" ), NULL, VLC_TRUE ); add_file( "kde-uirc", DATA_PATH "/ui.rc", NULL, N_( "path to ui.rc file" ), NULL, VLC_TRUE );
set_description( _("KDE interface") ); set_description( _("KDE interface") );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins * xcommon.c: Functions common to the X11 and XVideo plugins
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.38 2003/10/29 01:33:27 gbazin Exp $ * $Id: xcommon.c,v 1.39 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -2087,7 +2087,7 @@ static void TestNetWMSupport( vout_thread_t *p_vout ) ...@@ -2087,7 +2087,7 @@ static void TestNetWMSupport( vout_thread_t *p_vout )
0, 16384, False, AnyPropertyType, 0, 16384, False, AnyPropertyType,
&net_wm_supported, &net_wm_supported,
&i_format, &i_items, &i_bytesafter, &i_format, &i_items, &i_bytesafter,
(unsigned char **)&p_args ); (unsigned char **)(intptr_t)&p_args );
if( i_ret != Success || i_items == 0 ) return; if( i_ret != Success || i_items == 0 ) return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* effects.c : Effects for the visualization system * effects.c : Effects for the visualization system
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: effects.c,v 1.9 2003/10/24 17:43:51 sam Exp $ * $Id: effects.c,v 1.10 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Clment Stenac <zorglub@via.ecp.fr> * Authors: Clment Stenac <zorglub@via.ecp.fr>
* *
...@@ -148,7 +148,7 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout, ...@@ -148,7 +148,7 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
{ {
float f_in = *p_buffl + 384.0; float f_in = *p_buffl + 384.0;
int32_t i_in; int32_t i_in;
i_in = *(int32_t *)&f_in; i_in = *(int32_t *)(intptr_t)&f_in;
if(i_in > 0x43c07fff ) * p_buffs = 32767; if(i_in > 0x43c07fff ) * p_buffs = 32767;
else if ( i_in < 0x43bf8000 ) *p_buffs = -32768; else if ( i_in < 0x43bf8000 ) *p_buffs = -32768;
else *p_buffs = i_in - 0x43c00000; else *p_buffs = i_in - 0x43c00000;
...@@ -278,7 +278,6 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout, ...@@ -278,7 +278,6 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
p_picture->p[1].i_pitch + p_picture->p[1].i_pitch +
( ( i_band_width * i + j ) /2 ) ) = 0x00; ( ( i_band_width * i + j ) /2 ) ) = 0x00;
if( 0x04 * i_line - 0x0f > 0 ) if( 0x04 * i_line - 0x0f > 0 )
{ {
if( 0x04 * i_line - 0x0f < 0xff ) if( 0x04 * i_line - 0x0f < 0xff )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* item.c : Playlist item functions * item.c : Playlist item functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: item.c,v 1.5 2003/11/27 21:24:57 fenrir Exp $ * $Id: item.c,v 1.6 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/vout.h> #include <vlc/vout.h>
#include <vlc/sout.h> #include <vlc/sout.h>
#include <vlc/input.h>
#include "vlc_playlist.h" #include "vlc_playlist.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions * playlist.c : Playlist management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: playlist.c,v 1.67 2003/12/02 12:57:36 gbazin Exp $ * $Id: playlist.c,v 1.68 2003/12/04 16:02:54 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/vout.h> #include <vlc/vout.h>
#include <vlc/sout.h> #include <vlc/sout.h>
#include <vlc/input.h>
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
......
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