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 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* 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>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -93,6 +93,8 @@
typedef unsigned long long uint64_t;
typedef signed long long int64_t;
# endif
typedef uint32_t uintptr_t;
typedef int32_t intptr_t;
#endif
typedef uint8_t byte_t;
......
......@@ -2,7 +2,7 @@
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
* 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>
*
......@@ -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. */
float f_in = *p_in + 384.0;
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;
else if ( i_in < 0x43bf8000 ) *p_out = -32768;
else *p_out = i_in - 0x43c00000;
......
......@@ -2,7 +2,7 @@
* s16tofloat32.c : converter from signed 16 bits integer to float32
*****************************************************************************
* 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>
*
......@@ -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
* of 19 seconds for the above division. */
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;
#endif
......
......@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer
*****************************************************************************
* 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>
*
......@@ -2173,7 +2173,7 @@ static void InformationsCreate( input_thread_t *p_input )
{
char psz_buffer[MSTRTIME_MAX_SIZE];
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 )
......
......@@ -2,7 +2,7 @@
* kde.cpp : KDE plugin for vlc
*****************************************************************************
* 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
*
......@@ -50,7 +50,7 @@ static void run(intf_thread_t *p_intf);
* Module descriptor
*****************************************************************************/
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_file( "kde-uirc", DATA_PATH "/ui.rc", NULL, N_( "path to ui.rc file" ), NULL, VLC_TRUE );
set_description( _("KDE interface") );
......
......@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -2087,7 +2087,7 @@ static void TestNetWMSupport( vout_thread_t *p_vout )
0, 16384, False, AnyPropertyType,
&net_wm_supported,
&i_format, &i_items, &i_bytesafter,
(unsigned char **)&p_args );
(unsigned char **)(intptr_t)&p_args );
if( i_ret != Success || i_items == 0 ) return;
......
......@@ -2,7 +2,7 @@
* effects.c : Effects for the visualization system
*****************************************************************************
* 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>
*
......@@ -148,7 +148,7 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
{
float f_in = *p_buffl + 384.0;
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;
else if ( i_in < 0x43bf8000 ) *p_buffs = -32768;
else *p_buffs = i_in - 0x43c00000;
......@@ -278,7 +278,6 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
p_picture->p[1].i_pitch +
( ( i_band_width * i + j ) /2 ) ) = 0x00;
if( 0x04 * i_line - 0x0f > 0 )
{
if( 0x04 * i_line - 0x0f < 0xff )
......
......@@ -2,7 +2,7 @@
* item.c : Playlist item functions
*****************************************************************************
* 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>
*
......@@ -27,6 +27,7 @@
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/sout.h>
#include <vlc/input.h>
#include "vlc_playlist.h"
......
......@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions
*****************************************************************************
* 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>
*
......@@ -27,6 +27,7 @@
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/sout.h>
#include <vlc/input.h>
#include "stream_control.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