From d2dff4466b7e125a3734a3e83f3f0e476dc623e8 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Thu, 14 Dec 2006 20:56:18 +0000 Subject: [PATCH] * More compiler warning fixes (const mostly) --- modules/access_filter/record.c | 4 ++-- modules/audio_filter/channel_mixer/mono.c | 4 ++-- modules/audio_filter/equalizer_presets.h | 6 +++--- modules/codec/cmml/browser_open.c | 1 + modules/codec/cmml/history.c | 2 +- modules/codec/cmml/history.h | 2 +- modules/codec/sdl_image.c | 2 +- modules/codec/x264.c | 16 ++++++++-------- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/modules/access_filter/record.c b/modules/access_filter/record.c index 82c167e972..e42a9f6d88 100644 --- a/modules/access_filter/record.c +++ b/modules/access_filter/record.c @@ -320,9 +320,9 @@ static void Notify( access_t *p_access, vlc_bool_t b_dump ) if( p_sys->i_vout_chan != -1 ) { if( b_dump ) - vout_OSDMessage( p_vout, p_sys->i_vout_chan, "Recording" ); + vout_OSDMessage( p_vout, p_sys->i_vout_chan, _("Recording") ); else - vout_OSDMessage( p_vout, p_sys->i_vout_chan, "Recording done" ); + vout_OSDMessage( p_vout, p_sys->i_vout_chan, _("Recording done") ); } vlc_object_release( p_vout ); } diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c index 211a962461..4ad93c2c2b 100644 --- a/modules/audio_filter/channel_mixer/mono.c +++ b/modules/audio_filter/channel_mixer/mono.c @@ -94,8 +94,8 @@ struct filter_sys_t "except the selected channel. Choose one from (0=left, 1=right " \ "2=rear left, 3=rear right, 4=center, 5=left front)") -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5 }; -static char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5 }; +static const char *ppsz_pos_descriptions[] = { N_("Left"), N_("Right"), N_("Left rear"), N_("Right rear"), N_("Center"), N_("Left front") }; diff --git a/modules/audio_filter/equalizer_presets.h b/modules/audio_filter/equalizer_presets.h index e2647b9781..6c1f2f1b7f 100644 --- a/modules/audio_filter/equalizer_presets.h +++ b/modules/audio_filter/equalizer_presets.h @@ -31,12 +31,12 @@ #define EQZ_BANDS_MAX 10 #define NB_PRESETS 18 -static char *preset_list[] = { +static const char *preset_list[] = { "flat", "classical", "club", "dance", "fullbass", "fullbasstreble", "fulltreble", "headphones","largehall", "live", "party", "pop", "reggae", "rock", "ska", "soft", "softrock", "techno" }; -static char *preset_list_text[] = { +static const char *preset_list_text[] = { N_("Flat"), N_("Classical"), N_("Club"), N_("Dance"), N_("Full bass"), N_("Full bass and treble"), N_("Full treble"), N_("Headphones"), N_("Large Hall"), N_("Live"), N_("Party"), N_("Pop"), N_("Reggae"), @@ -45,7 +45,7 @@ static char *preset_list_text[] = { typedef struct { - char *psz_name; + const char *psz_name; int i_band; float f_preamp; float f_amp[EQZ_BANDS_MAX]; diff --git a/modules/codec/cmml/browser_open.c b/modules/codec/cmml/browser_open.c index f8a8a8e9ca..514c7ee626 100644 --- a/modules/codec/cmml/browser_open.c +++ b/modules/codec/cmml/browser_open.c @@ -28,6 +28,7 @@ #include #include "xstrcat.h" +#include "browser_open.h" int browser_Open( const char *psz_url ) { diff --git a/modules/codec/cmml/history.c b/modules/codec/cmml/history.c index 70377bb0d4..f1cb6d735e 100644 --- a/modules/codec/cmml/history.c +++ b/modules/codec/cmml/history.c @@ -49,7 +49,7 @@ static void history_Dump( history_t *p_history ); * Actual history code *****************************************************************************/ -history_t *history_New() +history_t *history_New( void ) { history_t *p_new_history; diff --git a/modules/codec/cmml/history.h b/modules/codec/cmml/history.h index a1319b921e..902ec77930 100644 --- a/modules/codec/cmml/history.h +++ b/modules/codec/cmml/history.h @@ -49,7 +49,7 @@ typedef struct history_t history_t; /***************************************************************************** * Exported prototypes *****************************************************************************/ -history_t * history_New (); +history_t * history_New ( void ); vlc_bool_t history_GoBackSavingCurrentItem ( history_t *, history_item_t * ); vlc_bool_t history_GoForwardSavingCurrentItem ( history_t *, diff --git a/modules/codec/sdl_image.c b/modules/codec/sdl_image.c index 70a8c6c0b9..2d40b42204 100644 --- a/modules/codec/sdl_image.c +++ b/modules/codec/sdl_image.c @@ -61,7 +61,7 @@ vlc_module_end(); static const struct supported_fmt_t { vlc_fourcc_t i_fourcc; - char *psz_sdl_type; + const char *psz_sdl_type; } p_supported_fmt[] = { { VLC_FOURCC('t','g','a',' '), "TGA" }, diff --git a/modules/codec/x264.c b/modules/codec/x264.c index 98aad69c84..622a8feb82 100644 --- a/modules/codec/x264.c +++ b/modules/codec/x264.c @@ -309,26 +309,26 @@ static void Close( vlc_object_t * ); #define AUD_LONGTEXT N_( "Generate access unit delimiter NAL units.") #if X264_BUILD >= 24 -static char *enc_me_list[] = +static const char *enc_me_list[] = { "dia", "hex", "umh", "esa" }; -static char *enc_me_list_text[] = +static const char *enc_me_list_text[] = { N_("dia"), N_("hex"), N_("umh"), N_("esa") }; #endif -static char *enc_analyse_list[] = +static const char *enc_analyse_list[] = { "none", "fast", "normal", "slow", "all" }; -static char *enc_analyse_list_text[] = +static const char *enc_analyse_list_text[] = { N_("none"), N_("fast"), N_("normal"), N_("slow"), N_("all") }; #if X264_BUILD >= 45 /* r457 */ -static char *direct_pred_list[] = +static const char *direct_pred_list[] = { "none", "spatial", "temporal", "auto" }; -static char *direct_pred_list_text[] = +static const char *direct_pred_list_text[] = { N_("none"), N_("spatial"), N_("temporal"), N_("auto") }; #else -static char *direct_pred_list[] = +static const char *direct_pred_list[] = { "none", "spatial", "temporal" }; -static char *direct_pred_list_text[] = +static const char *direct_pred_list_text[] = { N_("none"), N_("spatial"), N_("temporal") }; #endif -- 2.39.2