Commit 5f8cd399 authored by Justus Piater's avatar Justus Piater Committed by Rémi Denis-Courmont

Declared many static variables const

Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent c75cb72e
......@@ -50,7 +50,7 @@ static inline int bs_eof( bs_t *s )
}
static inline uint32_t bs_read( bs_t *s, int i_count )
{
static uint32_t i_mask[33] =
static const uint32_t i_mask[33] =
{ 0x00,
0x01, 0x03, 0x07, 0x0f,
0x1f, 0x3f, 0x7f, 0xff,
......
......@@ -286,7 +286,7 @@ static const GUID VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN = {0x00000000, 0x0000, 0x0000
#define WAVE_SPEAKER_TOP_BACK_RIGHT 0x20000
#define WAVE_SPEAKER_RESERVED 0x80000000
static struct
static const struct
{
uint16_t i_tag;
vlc_fourcc_t i_fourcc;
......@@ -354,7 +354,7 @@ static inline void fourcc_to_wf_tag( vlc_fourcc_t fcc, uint16_t *pi_tag )
* to determine the actual format. Microsoft has stopped giving out wFormatTag
* assignments in lieu of letting 3rd parties generate their own GUIDs
*/
static struct
static const struct
{
GUID guid_tag;
vlc_fourcc_t i_fourcc;
......
......@@ -241,7 +241,7 @@ static inline const char * GetCapabilityHelp( char *psz_capability, int i_type)
return " ";
}
static struct config_category_t categories_array[] =
static const struct config_category_t categories_array[] =
{
/* Interface */
{ CAT_INTERFACE, INTF_TITLE, INTF_HELP },
......
......@@ -66,7 +66,7 @@ static int gcry_vlc_mutex_unlock( void **lock )
return VLC_SUCCESS;
}
static struct gcry_thread_cbs gcry_threads_vlc =
static const struct gcry_thread_cbs gcry_threads_vlc =
{
GCRY_THREAD_OPTION_USER,
NULL,
......
......@@ -435,7 +435,7 @@ static int AccessControlResetCallback( vlc_object_t *p_this,
const char *psz_var, vlc_value_t oldval,
vlc_value_t newval, void *p_data );
static struct
static const struct
{
unsigned int i_v4l2;
int i_fourcc;
......@@ -480,7 +480,7 @@ static const __u32 p_chroma_fallbacks[] =
{ V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_YVU420, V4L2_PIX_FMT_YUV422P,
V4L2_PIX_FMT_YUYV, V4L2_PIX_FMT_UYVY, V4L2_PIX_FMT_MJPEG };
static struct
static const struct
{
const char *psz_name;
unsigned int i_cid;
......
......@@ -117,7 +117,7 @@ static block_t *S8toU8( filter_t *, block_t * );
static block_t *Swap16( filter_t *, block_t * );
static block_t *Swap24( filter_t *, block_t * );
static struct
static const struct
{
vlc_fourcc_t i_src;
vlc_fourcc_t i_dst;
......
......@@ -51,12 +51,12 @@ static void Close ( vlc_object_t * );
static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
aout_buffer_t * );
static void FilterFloatUP( float Imp[], float ImpD[], uint16_t Nwing,
static void FilterFloatUP( const float Imp[], const float ImpD[], uint16_t Nwing,
float *f_in, float *f_out, uint32_t ui_remainder,
uint32_t ui_output_rate, int16_t Inc,
int i_nb_channels );
static void FilterFloatUD( float Imp[], float ImpD[], uint16_t Nwing,
static void FilterFloatUD( const float Imp[], const float ImpD[], uint16_t Nwing,
float *f_in, float *f_out, uint32_t ui_remainder,
uint32_t ui_output_rate, uint32_t ui_input_rate,
int16_t Inc, int i_nb_channels );
......@@ -449,11 +449,11 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
void FilterFloatUP( float Imp[], float ImpD[], uint16_t Nwing, float *p_in,
void FilterFloatUP( const float Imp[], const float ImpD[], uint16_t Nwing, float *p_in,
float *p_out, uint32_t ui_remainder,
uint32_t ui_output_rate, int16_t Inc, int i_nb_channels )
{
float *Hp, *Hdp, *End;
const float *Hp, *Hdp, *End;
float t, temp;
uint32_t ui_linear_remainder;
int i;
......@@ -492,12 +492,12 @@ void FilterFloatUP( float Imp[], float ImpD[], uint16_t Nwing, float *p_in,
}
}
void FilterFloatUD( float Imp[], float ImpD[], uint16_t Nwing, float *p_in,
void FilterFloatUD( const float Imp[], const float ImpD[], uint16_t Nwing, float *p_in,
float *p_out, uint32_t ui_remainder,
uint32_t ui_output_rate, uint32_t ui_input_rate,
int16_t Inc, int i_nb_channels )
{
float *Hp, *Hdp, *End;
const float *Hp, *Hdp, *End;
float t, temp;
uint32_t ui_linear_remainder;
int i, ui_counter = 0;
......
......@@ -46,7 +46,7 @@
#define SMALL_FILTER_NMULT ((int16_t)13)
#define SMALL_FILTER_SCALE 13128 /* Unity-gain scale factor */
#define SMALL_FILTER_NWING 1536 /* Filter table length */
static float SMALL_FILTER_FLOAT_IMP[] /* Impulse response */ = {
static const float SMALL_FILTER_FLOAT_IMP[] /* Impulse response */ = {
0.900000,
0.899980,
0.899920,
......@@ -1585,7 +1585,7 @@ static float SMALL_FILTER_FLOAT_IMP[] /* Impulse response */ = {
-0.000046
};
static float SMALL_FILTER_FLOAT_IMPD[] /* Impulse response */ = {
static const float SMALL_FILTER_FLOAT_IMPD[] /* Impulse response */ = {
-0.000020,
-0.000060,
-0.000100,
......
......@@ -56,7 +56,7 @@ struct aout_sys_t
};
#define CHANNELS_MAX 6
static int pi_channels_maps[CHANNELS_MAX+1] =
static const int pi_channels_maps[CHANNELS_MAX+1] =
{
0,
AOUT_CHAN_CENTER,
......@@ -138,7 +138,7 @@ static int Open( vlc_object_t * p_this )
{
aout_instance_t * p_aout = (aout_instance_t *)p_this;
char * psz_name, * psz_format;
const char ** ppsz_compare = format_list;
const char * const * ppsz_compare = format_list;
vlc_value_t val;
int i_channels, i = 0;
......
......@@ -508,7 +508,7 @@ struct encoder_sys_t
int i_s16tolog; /* used with int16_t to m/alaw */
};
static int8_t alaw_encode[2049] =
static const int8_t alaw_encode[2049] =
{
0xD5, 0xD4, 0xD7, 0xD6, 0xD1, 0xD0, 0xD3, 0xD2, 0xDD, 0xDC, 0xDF, 0xDE,
0xD9, 0xD8, 0xDB, 0xDA, 0xC5, 0xC4, 0xC7, 0xC6, 0xC1, 0xC0, 0xC3, 0xC2,
......@@ -683,7 +683,7 @@ static int8_t alaw_encode[2049] =
0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x2A
}; /* alaw_encode */
static int8_t ulaw_encode[8193] =
static const int8_t ulaw_encode[8193] =
{
0xFF, 0xFE, 0xFE, 0xFD, 0xFD, 0xFC, 0xFC, 0xFB, 0xFB, 0xFA, 0xFA, 0xF9,
0xF9, 0xF8, 0xF8, 0xF7, 0xF7, 0xF6, 0xF6, 0xF5, 0xF5, 0xF4, 0xF4, 0xF3,
......
......@@ -45,7 +45,7 @@
#include "avcodec.h"
static unsigned int pi_channels_maps[7] =
static const unsigned int pi_channels_maps[7] =
{
0,
AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
......
......@@ -30,7 +30,7 @@ void LibavutilCallback( void *p_opaque, int i_level,
{
int i_vlc_level;
AVCodecContext *p_avctx = (AVCodecContext *)p_opaque;
AVClass *p_avc;
const AVClass *p_avc;
vlc_object_t *p_this;
char *psz_new_format;
const char *psz_item_name;
......
......@@ -25,7 +25,7 @@
/*****************************************************************************
* Codec fourcc -> ffmpeg_id mapping
*****************************************************************************/
static struct
static const struct
{
vlc_fourcc_t i_fourcc;
int i_codec;
......
......@@ -107,7 +107,7 @@ enum {
STATE_SEND_DATA
};
static int pi_channels_maps[7] =
static const int pi_channels_maps[7] =
{
0,
AOUT_CHAN_CENTER,
......@@ -1121,7 +1121,7 @@ static uint64_t read_utf8( const uint8_t *p_buf, int *pi_read )
}
/* CRC-8, poly = x^8 + x^2 + x^1 + x^0, init = 0 */
static uint8_t const flac_crc8_table[256] = {
static const uint8_t flac_crc8_table[256] = {
0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15,
0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D,
0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65,
......
......@@ -203,7 +203,7 @@ struct decoder_sys_t
int i_out;
};
static int pi_channels_maps[6] =
static const int pi_channels_maps[6] =
{
0,
AOUT_CHAN_CENTER,
......
......@@ -155,7 +155,7 @@ typedef struct __attribute__((__packed__)) {
void *__builtin_new(unsigned long size) {return malloc(size);}
void __builtin_delete(void *p) {free(p);}
static int pi_channels_maps[7] =
static const int pi_channels_maps[7] =
{
0,
AOUT_CHAN_CENTER,
......
......@@ -72,7 +72,7 @@ struct decoder_sys_t
};
static int pi_channels_maps[6] =
static const int pi_channels_maps[6] =
{
0,
AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
......
......@@ -99,7 +99,7 @@ struct decoder_sys_t
mtime_t prev_pts;
int i_page[9];
bool b_erase[9];
uint16_t * pi_active_national_set[9];
const uint16_t * pi_active_national_set[9];
int i_wanted_page, i_wanted_magazine;
bool b_ignore_sub_flag;
};
......@@ -119,7 +119,7 @@ struct decoder_sys_t
* 0x08 0x09 0x0a 0x0b 0x0c 0x0d (apparently a control character) 0x0e 0x0f
*/
static uint16_t ppi_national_subsets[][20] =
static const uint16_t ppi_national_subsets[][20] =
{
{ 0x00a3, 0x0024, 0x0040, 0x00ab, 0x00bd, 0x00bb, 0x005e, 0x0023,
0x002d, 0x00bc, 0x00a6, 0x00be, 0x00f7 }, /* english ,000 */
......
......@@ -95,7 +95,7 @@ struct decoder_sys_t
int pi_chan_table[AOUT_CHAN_MAX];
};
static int pi_channels_maps[9] =
static const int pi_channels_maps[9] =
{
0,
AOUT_CHAN_CENTER,
......
......@@ -214,17 +214,17 @@ DBUS_METHOD( handle_root );
DBUS_METHOD( handle_player );
DBUS_METHOD( handle_tracklist );
static DBusObjectPathVTable vlc_dbus_root_vtable = {
static const DBusObjectPathVTable vlc_dbus_root_vtable = {
NULL, handle_root, /* handler function */
NULL, NULL, NULL, NULL
};
static DBusObjectPathVTable vlc_dbus_player_vtable = {
static const DBusObjectPathVTable vlc_dbus_player_vtable = {
NULL, handle_player, /* handler function */
NULL, NULL, NULL, NULL
};
static DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
static const DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
NULL, handle_tracklist, /* handler function */
NULL, NULL, NULL, NULL
};
......
......@@ -74,7 +74,7 @@ enum macroType
};
/* Static mapping of macros type to macro strings */
static struct
static const struct
{
const char *psz_name;
int i_type;
......
......@@ -97,7 +97,7 @@ static int asai_child (iargs);
#undef iargs
/** vm functions. KEEP IN SYNC WITH imports.h! */
static asa_import_func importfuncs[] = {
static const asa_import_func importfuncs[] = {
asai_commit,
asai_discard,
asai_break,
......
......@@ -1264,7 +1264,7 @@ static void ASF_FreeObject_XXX( asf_object_t *p_obj)
/* */
static struct
static const struct
{
const guid_t *p_id;
int i_type;
......
......@@ -575,7 +575,7 @@ static void AVI_ChunkFree_indx( avi_chunk_t *p_chk )
static struct
static const struct
{
vlc_fourcc_t i_fourcc;
const char *psz_type;
......@@ -654,7 +654,7 @@ static void AVI_ChunkFree_nothing( avi_chunk_t *p_chk )
VLC_UNUSED( p_chk );
}
static struct
static const struct
{
vlc_fourcc_t i_fourcc;
int (*AVI_ChunkRead_function)( stream_t *s, avi_chunk_t *p_chk );
......
......@@ -2478,7 +2478,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
!strncmp( tracks[i_track]->psz_codec, "A_AAC/MPEG4/", strlen( "A_AAC/MPEG4/" ) ) )
{
int i_profile, i_srate, sbr = 0;
static unsigned int i_sample_rates[] =
static const unsigned int i_sample_rates[] =
{
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050,
16000, 12000, 11025, 8000, 7350, 0, 0, 0
......
......@@ -360,7 +360,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
if( p_drms->i_user == 0 && p_drms->i_key == 0 )
{
static char const p_secret[] = "tr1-th3n.y00_by3";
static const char p_secret[] = "tr1-th3n.y00_by3";
memcpy( p_drms->p_key, p_secret, 16 );
REVERSE( p_drms->p_key, 4 );
}
......@@ -703,7 +703,7 @@ static void InitShuffle( struct shuffle_s *p_shuffle, uint32_t *p_sys_key,
uint32_t i_version )
{
char p_secret1[] = "Tv!*";
static char const p_secret2[] = "____v8rhvsaAvOKM____FfUH%798=[;."
static const char p_secret2[] = "____v8rhvsaAvOKM____FfUH%798=[;."
"____f8677680a634____ba87fnOIf)(*";
unsigned int i;
......@@ -753,7 +753,7 @@ static void DoShuffle( struct shuffle_s *p_shuffle,
static uint32_t i_secret = 0;
static uint32_t p_secret3[] =
static const uint32_t p_secret3[] =
{
0xAAAAAAAA, 0x01757700, 0x00554580, 0x01724500, 0x00424580,
0x01427700, 0x00000080, 0xC1D59D01, 0x80144981, 0x815C8901,
......@@ -1506,8 +1506,8 @@ static void TinyShuffle8( uint32_t * p_bordel )
*****************************************************************************/
static int GetSystemKey( uint32_t *p_sys_key, bool b_ipod )
{
static char const p_secret5[ 8 ] = "YuaFlafu";
static char const p_secret6[ 8 ] = "zPif98ga";
static const char p_secret5[ 8 ] = "YuaFlafu";
static const char p_secret6[ 8 ] = "zPif98ga";
struct md5_s md5;
int64_t i_ipod_id;
uint32_t p_system_hash[ 4 ];
......@@ -1629,7 +1629,7 @@ static int ReadUserKey( void *_p_drms, uint32_t *p_user_key )
*****************************************************************************/
static int GetUserKey( void *_p_drms, uint32_t *p_user_key )
{
static char const p_secret7[] = "mUfnpognadfgf873";
static const char p_secret7[] = "mUfnpognadfgf873";
struct drms_s *p_drms = (struct drms_s *)_p_drms;
struct aes_s aes;
struct shuffle_s shuffle;
......@@ -1885,7 +1885,7 @@ static int HashSystemInfo( uint32_t *p_system_hash )
DWORD i_serial;
LPBYTE p_reg_buf;
static LPCTSTR p_reg_keys[ 3 ][ 2 ] =
static const LPCTSTR p_reg_keys[ 3 ][ 2 ] =
{
{
_T("HARDWARE\\DESCRIPTION\\System"),
......
......@@ -135,7 +135,7 @@ static int Demux( demux_t *p_demux )
return 0; /* Needed for correct operation of go back */
}
static struct
static const struct
{
const char *psz_name;
const char *psz_option;
......
......@@ -109,7 +109,7 @@ struct preset_t
const char *psz_chroma;
};
static struct preset_t p_presets[] =
static const struct preset_t p_presets[] =
{
{ "sqcif", 128, 96, 29.97, "4:3", "YV12" },
{ "qcif", 176, 144, 29.97, "4:3", "YV12" },
......@@ -133,7 +133,7 @@ static int Open( vlc_object_t * p_this )
uint32_t i_chroma;
char *psz_aspect_ratio;
unsigned int i_aspect = 0;
struct preset_t *p_preset = NULL;
const struct preset_t *p_preset = NULL;
const uint8_t *p_peek;
bool b_valid = false;
bool b_y4m = false;
......
......@@ -170,7 +170,7 @@ static int ParseRealText ( demux_t *, subtitle_t *, int );
static int ParseDKS ( demux_t *, subtitle_t *, int );
static int ParseSubViewer1 ( demux_t *, subtitle_t *, int );
static struct
static const struct
{
const char *psz_type_name;
int i_type;
......
......@@ -50,10 +50,10 @@ class PLItem;
#define DEPTH_PL -1
#define DEPTH_SEL 1
static int ItemUpdate_Type = QEvent::User + PLEventType + 2;
static int ItemDelete_Type = QEvent::User + PLEventType + 3;
static int ItemAppend_Type = QEvent::User + PLEventType + 4;
static int PLUpdate_Type = QEvent::User + PLEventType + 5;
static const int ItemUpdate_Type = QEvent::User + PLEventType + 2;
static const int ItemDelete_Type = QEvent::User + PLEventType + 3;
static const int ItemAppend_Type = QEvent::User + PLEventType + 4;
static const int PLUpdate_Type = QEvent::User + PLEventType + 5;
class PLEvent : public QEvent
{
......
......@@ -85,8 +85,8 @@ public slots:
#ifdef UPDATE_CHECK
static int UDOkEvent = QEvent::User + DialogEventType + 21;
static int UDErrorEvent = QEvent::User + DialogEventType + 22;
static const int UDOkEvent = QEvent::User + DialogEventType + 21;
static const int UDErrorEvent = QEvent::User + DialogEventType + 22;
class UpdateDialog : public QVLCFrame
{
......
......@@ -117,10 +117,10 @@ enum {
PLEventType = 200
};
static int DialogEvent_Type = QEvent::User + DialogEventType + 1;
//static int PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
//static int PLDockEvent_Type = QEvent::User + DialogEventType + 3;
static int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4;
static const int DialogEvent_Type = QEvent::User + DialogEventType + 1;
//static const int PLUndockEvent_Type = QEvent::User + DialogEventType + 2;
//static const int PLDockEvent_Type = QEvent::User + DialogEventType + 3;
static const int SetVideoOnTopEvent_Type = QEvent::User + DialogEventType + 4;
class DialogEvent : public QEvent
{
......
......@@ -644,7 +644,7 @@ static int LoadFontsFromAttachments( filter_t *p_filter )
static int Render( filter_t *p_filter, subpicture_region_t *p_region,
line_desc_t *p_line, int i_width, int i_height )
{
static uint8_t pi_gamma[16] =
static const uint8_t pi_gamma[16] =
{0x00, 0x52, 0x84, 0x96, 0xb8, 0xca, 0xdc, 0xee, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
......
......@@ -98,14 +98,14 @@ static int vlclua_demux_readline( lua_State *L )
*
*****************************************************************************/
/* Functions to register */
static luaL_Reg p_reg[] =
static const luaL_Reg p_reg[] =
{
{ "peek", vlclua_demux_peek },
{ NULL, NULL }
};
/* Functions to register for parse() function call only */
static luaL_Reg p_reg_parse[] =
static const luaL_Reg p_reg_parse[] =
{
{ "read", vlclua_demux_read },
{ "readline", vlclua_demux_readline },
......
......@@ -97,7 +97,7 @@ static inline void luaL_register_submodule( lua_State *L, const char *psz_name,
lua_setfield( L, -2, psz_name );
}
static struct
static const struct
{
const char *psz_shortcut;
const char *psz_name;
......@@ -145,7 +145,7 @@ static char *GetModuleName( intf_thread_t *p_intf )
return config_GetPsz( p_intf, "lua-intf" );
}
static luaL_Reg p_reg[] = { { NULL, NULL } };
static const luaL_Reg p_reg[] = { { NULL, NULL } };
int Open_LuaIntf( vlc_object_t *p_this )
{
......
......@@ -58,7 +58,7 @@ static lua_State *vlclua_meta_init( vlc_object_t *p_this,
/*****************************************************************************
* Init lua
*****************************************************************************/
static luaL_Reg p_reg[] = { { NULL, NULL } };
static const luaL_Reg p_reg[] = { { NULL, NULL } };
static lua_State * vlclua_meta_init( vlc_object_t *p_this, input_item_t * p_item )
{
......
......@@ -133,7 +133,7 @@ struct filter_sys_t
int i_logpy;
};
static uint8_t pi_gamma[16] =
static const uint8_t pi_gamma[16] =
{0x00, 0x41, 0x52, 0x63, 0x84, 0x85, 0x96, 0xa7, 0xb8, 0xc9,
0xca, 0xdb, 0xdc, 0xed, 0xee, 0xff};
......
......@@ -1533,7 +1533,7 @@ static bo_t *GetStblBox( sout_mux_t *p_mux, mp4_stream_t *p_stream )
static int64_t get_timestamp(void);
static uint32_t mvhd_matrix[9] =
static const uint32_t mvhd_matrix[9] =
{ 0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000 };
static bo_t *GetMoovBox( sout_mux_t *p_mux )
......
......@@ -287,7 +287,7 @@ static int transcode_osd_process( sout_stream_t *, sout_stream_id_t *,
static int EncoderThread( struct sout_stream_sys_t * p_sys );
static int pi_channels_maps[6] =
static const int pi_channels_maps[6] =
{
0,
AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
......
......@@ -70,15 +70,15 @@ void I420_RGB8( filter_t *p_filter, picture_t *p_src, picture_t *p_dest )
- p_src->p[1].i_visible_pitch;
/* The dithering matrices */
static int dither10[4] = { 0x0, 0x8, 0x2, 0xa };
static int dither11[4] = { 0xc, 0x4, 0xe, 0x6 };
static int dither12[4] = { 0x3, 0xb, 0x1, 0x9 };
static int dither13[4] = { 0xf, 0x7, 0xd, 0x5 };
static int dither20[4] = { 0x0, 0x10, 0x4, 0x14 };
static int dither21[4] = { 0x18, 0x8, 0x1c, 0xc };
static int dither22[4] = { 0x6, 0x16, 0x2, 0x12 };
static int dither23[4] = { 0x1e, 0xe, 0x1a, 0xa };
static const int dither10[4] = { 0x0, 0x8, 0x2, 0xa };
static const int dither11[4] = { 0xc, 0x4, 0xe, 0x6 };
static const int dither12[4] = { 0x3, 0xb, 0x1, 0x9 };
static const int dither13[4] = { 0xf, 0x7, 0xd, 0x5 };
static const int dither20[4] = { 0x0, 0x10, 0x4, 0x14 };
static const int dither21[4] = { 0x18, 0x8, 0x1c, 0xc };
static const int dither22[4] = { 0x6, 0x16, 0x2, 0x12 };
static const int dither23[4] = { 0x1e, 0xe, 0x1a, 0xa };
SetOffset( p_filter->fmt_in.video.i_width,
p_filter->fmt_in.video.i_height,
......
......@@ -217,12 +217,12 @@ strings for settings menus and hints
#define FILTERMODE_TEXT N_("Filter mode")
#define FILTERMODE_LONGTEXT N_("kind of filtering which should be use to "\
"calcuate the color output")
static int pi_filtermode_values[] = {
static const int pi_filtermode_values[] = {
(int)afmNoFilter,
(int)afmCombined,
(int)afmPercent
};
static const char *ppsz_filtermode_descriptions[] = {
static const char *const ppsz_filtermode_descriptions[] = {
N_("No Filtering"),
N_("Combined"),
N_("Percent")
......@@ -242,7 +242,7 @@ static const char *ppsz_filtermode_descriptions[] = {
#define CHANNELASSIGN_LONGTEXT N_("Maps the hardware channel X to logical "\
"channel Y to fix wrong wiring :-)")
static int pi_channel_assignment_values[] = {
static const int pi_channel_assignment_values[] = {
-1,
0,
1,
......@@ -250,7 +250,7 @@ static int pi_channel_assignment_values[] = {
3,
4
};
static const char *ppsz_channel_assignment_descriptions[] = {
static const char *const ppsz_channel_assignment_descriptions[] = {
N_("disabled"),
N_("summary"),
N_("left"),
......
......@@ -792,7 +792,7 @@ static int exec_StartAtomic( filter_t *p_filter,
/*****************************************************************************
* Command functions
*****************************************************************************/
static commanddesc_t p_commands[] =
static const commanddesc_t p_commands[] =
{
{ .psz_command = "DataSharedMem",
.b_atomic = true,
......
......@@ -638,7 +638,7 @@ static int Manage( vout_thread_t *p_vout )
/*****************************************************************************
* Key events handling
*****************************************************************************/
static struct
static const struct
{
SDLKey sdl_key;
int i_vlckey;
......
......@@ -155,7 +155,7 @@ vlc_module_end();
/* following functions are local */
static unsigned accel_priority[] = {
static const unsigned accel_priority[] = {
VLC_XVMC_ACCEL_VLD,
};
......
......@@ -167,7 +167,7 @@ static void DoWork( aout_instance_t *, aout_filter_t *,
aout_buffer_t *, aout_buffer_t * );
static int FilterCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static struct
static const struct
{
const char *psz_name;
int (*pf_run)( visual_effect_t *, aout_instance_t *,
......
......@@ -108,7 +108,7 @@ int
{
int this_option_optind = optind ? optind : 1;
int option_index = 0;
static struct option long_options[] =
static const struct option long_options[] =
{
{"add", 1, 0, 0},
{"append", 0, 0, 0},
......
......@@ -502,7 +502,7 @@ static picture_t *ImageFilter( image_handler_t *p_image, picture_t *p_pic,
* Misc functions
*
*/
static struct
static const struct
{
vlc_fourcc_t i_codec;
const char *psz_ext;
......
......@@ -102,7 +102,7 @@ int nanosleep(struct timespec *, struct timespec *);
*/
char *mstrtime( char *psz_buffer, mtime_t date )
{
static mtime_t ll1000 = 1000, ll60 = 60, ll24 = 24;
static const mtime_t ll1000 = 1000, ll60 = 60, ll24 = 24;
snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%02d:%02d:%02d-%03d.%03d",
(int) (date / (ll1000 * ll1000 * ll60 * ll60) % ll24),
......
......@@ -189,7 +189,7 @@ struct httpd_client_t
/*****************************************************************************
* Various functions
*****************************************************************************/
static struct
static const struct
{