add const to const * strings
I don't think this will amke any difference except maybe for hosted ports Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
This commit is contained in:
parent
4dd3c2b33e
commit
79864c6ec2
14 changed files with 25 additions and 25 deletions
|
@ -601,7 +601,7 @@ static int parse_viewporttextstyle(struct skin_element *element,
|
|||
*line = (struct line_desc)LINE_DESC_DEFINIT;
|
||||
unsigned colour;
|
||||
|
||||
static const char *vp_options[] = { "invert", "color", "colour",
|
||||
static const char * const vp_options[] = { "invert", "color", "colour",
|
||||
"clear", "gradient", NULL};
|
||||
|
||||
int vp_op = string_option(mode, vp_options, false);
|
||||
|
@ -1401,7 +1401,7 @@ static int parse_skinvar( struct skin_element *element,
|
|||
return 0;
|
||||
case SKIN_TOKEN_VAR_SET:
|
||||
{
|
||||
static const char *sv_options[] = {"touch", "set", "inc", "dec", NULL};
|
||||
static const char * const sv_options[] = {"touch", "set", "inc", "dec", NULL};
|
||||
|
||||
struct skin_var_changer *data = skin_buffer_alloc(sizeof(*data));
|
||||
if (!data)
|
||||
|
@ -1705,7 +1705,7 @@ static int parse_touchregion(struct skin_element *element,
|
|||
if (region->action == ACTION_NONE)
|
||||
return WPS_ERROR_INVALID_PARAM;
|
||||
}
|
||||
static const char *pm_options[] = {"allow_while_locked", "reverse_bar",
|
||||
static const char * const pm_options[] = {"allow_while_locked", "reverse_bar",
|
||||
"repeat_press", "long_press", NULL};
|
||||
int pm_op;
|
||||
|
||||
|
|
|
@ -1395,7 +1395,7 @@ int split_string(char *str, const char split_char, char *vector[], const int vec
|
|||
/* returns match index from option list
|
||||
* returns -1 if option was not found
|
||||
* option list is array of char pointers with the final item set to null
|
||||
* ex - const char *option[] = { "op_a", "op_b", "op_c", NULL}
|
||||
* ex - const char * const option[] = { "op_a", "op_b", "op_c", NULL}
|
||||
*/
|
||||
int string_option(const char *option, const char *const oplist[], bool ignore_case)
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ static void fix_path_part(char* path, int offset, int count)
|
|||
}
|
||||
|
||||
#ifdef USE_JPEG_COVER
|
||||
static const char * extensions[] = { "jpeg", "jpg", "bmp" };
|
||||
static const char * const extensions[] = { "jpeg", "jpg", "bmp" };
|
||||
static const unsigned char extension_lens[] = { 4, 3, 3 };
|
||||
/* Try checking for several file extensions, return true if a file is found and
|
||||
* leaving the path modified to include the matching extension.
|
||||
|
|
|
@ -189,7 +189,7 @@ static short balance_mem[BAL_MEM_SIZE];
|
|||
#define AGC_MODE_SIZE 5
|
||||
#define AGC_SAFETY_MODE 0
|
||||
|
||||
static const char* agc_preset_str[] =
|
||||
static const char* const agc_preset_str[] =
|
||||
{ "Off", "S", "L", "D", "M", "V" };
|
||||
/* "Off",
|
||||
"Safety (clip)",
|
||||
|
|
|
@ -312,7 +312,7 @@ static int readline_cb(int n, char *buf, void *parameters)
|
|||
}
|
||||
else if (sc && settings_parseline(buf, &name, &value))
|
||||
{
|
||||
static const char *nm_options[] = {"type", "name", "data",
|
||||
static const char * const nm_options[] = {"type", "name", "data",
|
||||
"icon", "talkclip", NULL};
|
||||
int nm_op = string_option(name, nm_options, false);
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ static int tempbuf_handle;
|
|||
(1LU << tag_virt_canonicalartist))
|
||||
|
||||
/* String presentation of the tags defined in tagcache.h. Must be in correct order! */
|
||||
static const char *tags_str[] = { "artist", "album", "genre", "title",
|
||||
static const char * const tags_str[] = { "artist", "album", "genre", "title",
|
||||
"filename", "composer", "comment", "albumartist", "grouping", "year",
|
||||
"discnumber", "tracknumber", "canonicalartist", "bitrate", "length",
|
||||
"playcount", "rating", "playtime", "lastplayed", "commitid", "mtime",
|
||||
|
@ -151,7 +151,7 @@ static const char *tags_str[] = { "artist", "album", "genre", "title",
|
|||
"tag_virt_entryage", "tag_virt_autoscore"
|
||||
};
|
||||
/* more debug strings */
|
||||
static const char *tag_type_str[] = {
|
||||
static const char * const tag_type_str[] = {
|
||||
[clause_none] = "clause_none", [clause_is] = "clause_is",
|
||||
[clause_is_not] = "clause_is_not", [clause_gt] = "clause_gt",
|
||||
[clause_gteq] = "clause_gteq", [clause_lt] = "clause_lt",
|
||||
|
|
|
@ -940,8 +940,8 @@ bool dbg_hw_info_emi(void)
|
|||
|
||||
bool dbg_hw_info_audio(void)
|
||||
{
|
||||
static const char *hp_sel[2] = {"DAC", "Line1"};
|
||||
static const char *mux_sel[4] = {"Mic", "Line1", "HP", "Line2"};
|
||||
static const char * const hp_sel[2] = {"DAC", "Line1"};
|
||||
static const char * const mux_sel[4] = {"Mic", "Line1", "HP", "Line2"};
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
|
||||
while(1)
|
||||
|
@ -1171,7 +1171,7 @@ bool dbg_hw_info_button(void)
|
|||
}
|
||||
else if(MAP[i].periph == IMX233_BUTTON_LRADC)
|
||||
{
|
||||
static const char *op_name[] =
|
||||
static const char * const op_name[] =
|
||||
{
|
||||
[IMX233_BUTTON_EQ] = "eq",
|
||||
[IMX233_BUTTON_GT] = "gt",
|
||||
|
|
|
@ -112,7 +112,7 @@ bool dbg_hw_info(void)
|
|||
_DEBUG_PRINTF("PMU:");
|
||||
for(i=0;i<7;i++)
|
||||
{
|
||||
char *device[] = {"(unknown)",
|
||||
static const char * const device[] = {"(unknown)",
|
||||
"(CLICKWHEEL)",
|
||||
"(LCD)",
|
||||
"(AUDIO)",
|
||||
|
@ -139,7 +139,7 @@ bool dbg_hw_info(void)
|
|||
char line_cfg[4];
|
||||
int abr_stat;
|
||||
uint32_t abr_cnt;
|
||||
char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
|
||||
static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
|
||||
|
||||
uartc_port_get_line_info(&ser_port,
|
||||
&tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
|
||||
|
|
|
@ -104,7 +104,7 @@ bool dbg_hw_info(void)
|
|||
_DEBUG_PRINTF("PMU:");
|
||||
for(i=0;i<7;i++)
|
||||
{
|
||||
char *device[] = {"unknown",
|
||||
static const char *const device[] = {"unknown",
|
||||
"unknown",
|
||||
"LCD",
|
||||
"AUDIO",
|
||||
|
@ -157,7 +157,7 @@ bool dbg_hw_info(void)
|
|||
char line_cfg[4];
|
||||
int abr_stat;
|
||||
uint32_t abr_cnt;
|
||||
char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
|
||||
static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
|
||||
|
||||
uartc_port_get_line_info(&ser_port,
|
||||
&tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
|
||||
|
|
|
@ -123,7 +123,7 @@ static void* pcm_thread_run(void* nothing)
|
|||
|
||||
/* https://github.com/tinyalsa/tinyalsa/blob/master/tinypcminfo.c */
|
||||
|
||||
static const char* format_lookup[] =
|
||||
static const char* const format_lookup[] =
|
||||
{
|
||||
/*[0] =*/ "S8",
|
||||
"U8",
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "sysfs-ibasso.h"
|
||||
|
||||
|
||||
static const char* SYSFS_PATHS[] =
|
||||
static const char* const SYSFS_PATHS[] =
|
||||
{
|
||||
/* SYSFS_DX50_CODEC_VOLUME */
|
||||
"/dev/codec_volume",
|
||||
|
|
|
@ -63,8 +63,8 @@ void usb_enable(bool on)
|
|||
*/
|
||||
int disk_mount_all(void)
|
||||
{
|
||||
const char *dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"};
|
||||
const char *fs[] = {"vfat", "exfat"};
|
||||
const char * const dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"};
|
||||
const char * const fs[] = {"vfat", "exfat"};
|
||||
|
||||
sysfs_set_string("/sys/class/android_usb/android0/f_mass_storage/lun/file", "");
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */
|
||||
#define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */
|
||||
#define FIXED_OUTBUFCOUNT 4096
|
||||
#define NBUFFERS 4
|
||||
|
||||
enum tdspeed_ops
|
||||
{
|
||||
|
@ -65,9 +64,9 @@ static struct tdspeed_state_s
|
|||
int32_t *ovl_buff[2]; /* overlap buffer (L+R) */
|
||||
} tdspeed_state;
|
||||
|
||||
static int32_t *buffers[NBUFFERS] = { NULL, NULL, NULL, NULL };
|
||||
static int32_t *buffers[TDSPEED_NBUFFERS] = { NULL, NULL, NULL, NULL };
|
||||
|
||||
static const int buffer_sizes[NBUFFERS] =
|
||||
static const int buffer_sizes[TDSPEED_NBUFFERS] =
|
||||
{
|
||||
FIXED_BUFCOUNT * sizeof(int32_t),
|
||||
FIXED_BUFCOUNT * sizeof(int32_t),
|
||||
|
@ -552,7 +551,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
|
|||
break;
|
||||
|
||||
case DSP_PROC_INIT:
|
||||
if (!tdspeed_alloc_buffers(buffers, buffer_sizes, NBUFFERS))
|
||||
if (!tdspeed_alloc_buffers(buffers, buffer_sizes, TDSPEED_NBUFFERS))
|
||||
return -1; /* fail the init */
|
||||
|
||||
st->this = this;
|
||||
|
@ -564,7 +563,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
|
|||
st->this = NULL;
|
||||
st->factor = PITCH_SPEED_100;
|
||||
dsp_outbuf.remcount = 0;
|
||||
tdspeed_free_buffers(buffers, NBUFFERS);
|
||||
tdspeed_free_buffers(buffers, TDSPEED_NBUFFERS);
|
||||
break;
|
||||
|
||||
case DSP_PROC_NEW_FORMAT:
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */
|
||||
#define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */
|
||||
#define TDSPEED_NBUFFERS 4
|
||||
|
||||
void dsp_timestretch_enable(bool enable);
|
||||
void dsp_set_timestretch(int32_t percent);
|
||||
|
|
Loading…
Reference in a new issue