Add const to global pointers to strings.
When a global pointer is not declared as constant, gcc will put it in memory. Getting the address of the string it points to requires loading the address of the pointer and then loading the pointer. When the pointer is declared constant, the address of the string is loaded directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31345 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f372212adf
commit
17ed3253fc
4 changed files with 9 additions and 8 deletions
|
@ -62,7 +62,8 @@ enum {
|
|||
#define WAVE_CHUNKNAME_LENGTH 4
|
||||
#define WAVE_CHUNKSIZE_LENGTH 4
|
||||
|
||||
static const unsigned char *wave_chunklist = "RIFF"
|
||||
static const unsigned char * const wave_chunklist
|
||||
= "RIFF"
|
||||
"WAVE"
|
||||
"fmt "
|
||||
"fact"
|
||||
|
@ -73,7 +74,7 @@ static const unsigned char *wave_chunklist = "RIFF"
|
|||
#define WAVE64_CHUNKNAME_LENGTH 16
|
||||
#define WAVE64_CHUNKSIZE_LENGTH 8
|
||||
|
||||
static const unsigned char *wave64_chunklist
|
||||
static const unsigned char * const wave64_chunklist
|
||||
= "riff\x2e\x91\xcf\x11\xa5\xd6\x28\xdb\x04\xc1\x00\x00"
|
||||
"wave\xf3\xac\xd3\x11\x8c\xd1\x00\xc0\x4f\x8e\xdb\x8a"
|
||||
"fmt \xf3\xac\xd3\x11\x8c\xd1\x00\xc0\x4f\x8e\xdb\x8a"
|
||||
|
|
|
@ -130,7 +130,7 @@ static bool kbd_loaded = false;
|
|||
|
||||
#ifdef HAVE_MORSE_INPUT
|
||||
/* FIXME: We should put this to a configuration file. */
|
||||
static const char *morse_alphabets =
|
||||
static const char * const morse_alphabets =
|
||||
"abcdefghijklmnopqrstuvwxyz1234567890,.?-@ ";
|
||||
static const unsigned char morse_codes[] = {
|
||||
0x05,0x18,0x1a,0x0c,0x02,0x12,0x0e,0x10,0x04,0x17,0x0d,0x14,0x07,
|
||||
|
|
|
@ -192,14 +192,14 @@ struct master_header {
|
|||
};
|
||||
|
||||
/* For the endianess correction */
|
||||
static const char *tagfile_entry_ec = "ll";
|
||||
static const char * const tagfile_entry_ec = "ll";
|
||||
/**
|
||||
Note: This should be (1 + TAG_COUNT) amount of l's.
|
||||
*/
|
||||
static const char *index_entry_ec = "llllllllllllllllllllll";
|
||||
static const char * const index_entry_ec = "llllllllllllllllllllll";
|
||||
|
||||
static const char *tagcache_header_ec = "lll";
|
||||
static const char *master_header_ec = "llllll";
|
||||
static const char * const tagcache_header_ec = "lll";
|
||||
static const char * const master_header_ec = "llllll";
|
||||
|
||||
static struct master_header current_tcmh;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ extern struct spi_node mc13783_spi;
|
|||
|
||||
/* PMIC event service data */
|
||||
static int mc13783_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)];
|
||||
static const char *mc13783_thread_name = "pmic";
|
||||
static const char * const mc13783_thread_name = "pmic";
|
||||
static struct semaphore mc13783_svc_wake;
|
||||
|
||||
/* Synchronous thread communication objects */
|
||||
|
|
Loading…
Reference in a new issue