diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-05-03 22:54:33 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-05-03 23:00:58 -0400 |
commit | 79864c6ec22370ae31d3259a17e0c93db3cdae61 (patch) | |
tree | 6de3a54700d84db34eab150740006dd74d359cd2 /apps | |
parent | 4dd3c2b33ec3d181f54cc1bcf5b596401a8cfcbb (diff) | |
download | rockbox-79864c6ec22370ae31d3259a17e0c93db3cdae61.tar.gz rockbox-79864c6ec22370ae31d3259a17e0c93db3cdae61.zip |
add const to const * strings
I don't think this will amke any difference except maybe for hosted ports
Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 6 | ||||
-rw-r--r-- | apps/misc.c | 2 | ||||
-rw-r--r-- | apps/recorder/albumart.c | 2 | ||||
-rw-r--r-- | apps/recorder/recording.c | 2 | ||||
-rw-r--r-- | apps/shortcuts.c | 2 | ||||
-rw-r--r-- | apps/tagcache.c | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 1a6861ff16..d89ca8b534 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -601,7 +601,7 @@ static int parse_viewporttextstyle(struct skin_element *element, | |||
601 | *line = (struct line_desc)LINE_DESC_DEFINIT; | 601 | *line = (struct line_desc)LINE_DESC_DEFINIT; |
602 | unsigned colour; | 602 | unsigned colour; |
603 | 603 | ||
604 | static const char *vp_options[] = { "invert", "color", "colour", | 604 | static const char * const vp_options[] = { "invert", "color", "colour", |
605 | "clear", "gradient", NULL}; | 605 | "clear", "gradient", NULL}; |
606 | 606 | ||
607 | int vp_op = string_option(mode, vp_options, false); | 607 | int vp_op = string_option(mode, vp_options, false); |
@@ -1401,7 +1401,7 @@ static int parse_skinvar( struct skin_element *element, | |||
1401 | return 0; | 1401 | return 0; |
1402 | case SKIN_TOKEN_VAR_SET: | 1402 | case SKIN_TOKEN_VAR_SET: |
1403 | { | 1403 | { |
1404 | static const char *sv_options[] = {"touch", "set", "inc", "dec", NULL}; | 1404 | static const char * const sv_options[] = {"touch", "set", "inc", "dec", NULL}; |
1405 | 1405 | ||
1406 | struct skin_var_changer *data = skin_buffer_alloc(sizeof(*data)); | 1406 | struct skin_var_changer *data = skin_buffer_alloc(sizeof(*data)); |
1407 | if (!data) | 1407 | if (!data) |
@@ -1705,7 +1705,7 @@ static int parse_touchregion(struct skin_element *element, | |||
1705 | if (region->action == ACTION_NONE) | 1705 | if (region->action == ACTION_NONE) |
1706 | return WPS_ERROR_INVALID_PARAM; | 1706 | return WPS_ERROR_INVALID_PARAM; |
1707 | } | 1707 | } |
1708 | static const char *pm_options[] = {"allow_while_locked", "reverse_bar", | 1708 | static const char * const pm_options[] = {"allow_while_locked", "reverse_bar", |
1709 | "repeat_press", "long_press", NULL}; | 1709 | "repeat_press", "long_press", NULL}; |
1710 | int pm_op; | 1710 | int pm_op; |
1711 | 1711 | ||
diff --git a/apps/misc.c b/apps/misc.c index d5e8bb5d98..63aa3589b2 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -1395,7 +1395,7 @@ int split_string(char *str, const char split_char, char *vector[], const int vec | |||
1395 | /* returns match index from option list | 1395 | /* returns match index from option list |
1396 | * returns -1 if option was not found | 1396 | * returns -1 if option was not found |
1397 | * option list is array of char pointers with the final item set to null | 1397 | * option list is array of char pointers with the final item set to null |
1398 | * ex - const char *option[] = { "op_a", "op_b", "op_c", NULL} | 1398 | * ex - const char * const option[] = { "op_a", "op_b", "op_c", NULL} |
1399 | */ | 1399 | */ |
1400 | int string_option(const char *option, const char *const oplist[], bool ignore_case) | 1400 | int string_option(const char *option, const char *const oplist[], bool ignore_case) |
1401 | { | 1401 | { |
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index 5b3658a1cb..9ff9c72f80 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c | |||
@@ -98,7 +98,7 @@ static void fix_path_part(char* path, int offset, int count) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | #ifdef USE_JPEG_COVER | 100 | #ifdef USE_JPEG_COVER |
101 | static const char * extensions[] = { "jpeg", "jpg", "bmp" }; | 101 | static const char * const extensions[] = { "jpeg", "jpg", "bmp" }; |
102 | static const unsigned char extension_lens[] = { 4, 3, 3 }; | 102 | static const unsigned char extension_lens[] = { 4, 3, 3 }; |
103 | /* Try checking for several file extensions, return true if a file is found and | 103 | /* Try checking for several file extensions, return true if a file is found and |
104 | * leaving the path modified to include the matching extension. | 104 | * leaving the path modified to include the matching extension. |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index a54b762566..db8d892b7c 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -189,7 +189,7 @@ static short balance_mem[BAL_MEM_SIZE]; | |||
189 | #define AGC_MODE_SIZE 5 | 189 | #define AGC_MODE_SIZE 5 |
190 | #define AGC_SAFETY_MODE 0 | 190 | #define AGC_SAFETY_MODE 0 |
191 | 191 | ||
192 | static const char* agc_preset_str[] = | 192 | static const char* const agc_preset_str[] = |
193 | { "Off", "S", "L", "D", "M", "V" }; | 193 | { "Off", "S", "L", "D", "M", "V" }; |
194 | /* "Off", | 194 | /* "Off", |
195 | "Safety (clip)", | 195 | "Safety (clip)", |
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 754bd83b80..2b032f1fd4 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -312,7 +312,7 @@ static int readline_cb(int n, char *buf, void *parameters) | |||
312 | } | 312 | } |
313 | else if (sc && settings_parseline(buf, &name, &value)) | 313 | else if (sc && settings_parseline(buf, &name, &value)) |
314 | { | 314 | { |
315 | static const char *nm_options[] = {"type", "name", "data", | 315 | static const char * const nm_options[] = {"type", "name", "data", |
316 | "icon", "talkclip", NULL}; | 316 | "icon", "talkclip", NULL}; |
317 | int nm_op = string_option(name, nm_options, false); | 317 | int nm_op = string_option(name, nm_options, false); |
318 | 318 | ||
diff --git a/apps/tagcache.c b/apps/tagcache.c index b6d15e7a1f..436d85812b 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -137,7 +137,7 @@ static int tempbuf_handle; | |||
137 | (1LU << tag_virt_canonicalartist)) | 137 | (1LU << tag_virt_canonicalartist)) |
138 | 138 | ||
139 | /* String presentation of the tags defined in tagcache.h. Must be in correct order! */ | 139 | /* String presentation of the tags defined in tagcache.h. Must be in correct order! */ |
140 | static const char *tags_str[] = { "artist", "album", "genre", "title", | 140 | static const char * const tags_str[] = { "artist", "album", "genre", "title", |
141 | "filename", "composer", "comment", "albumartist", "grouping", "year", | 141 | "filename", "composer", "comment", "albumartist", "grouping", "year", |
142 | "discnumber", "tracknumber", "canonicalartist", "bitrate", "length", | 142 | "discnumber", "tracknumber", "canonicalartist", "bitrate", "length", |
143 | "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime", | 143 | "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime", |
@@ -151,7 +151,7 @@ static const char *tags_str[] = { "artist", "album", "genre", "title", | |||
151 | "tag_virt_entryage", "tag_virt_autoscore" | 151 | "tag_virt_entryage", "tag_virt_autoscore" |
152 | }; | 152 | }; |
153 | /* more debug strings */ | 153 | /* more debug strings */ |
154 | static const char *tag_type_str[] = { | 154 | static const char * const tag_type_str[] = { |
155 | [clause_none] = "clause_none", [clause_is] = "clause_is", | 155 | [clause_none] = "clause_none", [clause_is] = "clause_is", |
156 | [clause_is_not] = "clause_is_not", [clause_gt] = "clause_gt", | 156 | [clause_is_not] = "clause_is_not", [clause_gt] = "clause_gt", |
157 | [clause_gteq] = "clause_gteq", [clause_lt] = "clause_lt", | 157 | [clause_gteq] = "clause_gteq", [clause_lt] = "clause_lt", |