Make some arrays const.
This commit is contained in:
@@ -211,7 +211,7 @@ void DbgInfoFile (void)
|
||||
void DbgInfoFunc (void)
|
||||
/* Parse and handle func subcommand of the .dbg pseudo instruction */
|
||||
{
|
||||
static const char* StorageKeys[] = {
|
||||
static const char* const StorageKeys[] = {
|
||||
"EXTERN",
|
||||
"STATIC",
|
||||
};
|
||||
@@ -352,7 +352,7 @@ void DbgInfoLine (void)
|
||||
void DbgInfoSym (void)
|
||||
/* Parse and handle SYM subcommand of the .dbg pseudo instruction */
|
||||
{
|
||||
static const char* StorageKeys[] = {
|
||||
static const char* const StorageKeys[] = {
|
||||
"AUTO",
|
||||
"EXTERN",
|
||||
"REGISTER",
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
/* Names of the features */
|
||||
static const char* FeatureKeys[FEAT_COUNT] = {
|
||||
static const char* const FeatureKeys[FEAT_COUNT] = {
|
||||
"dollar_is_pc",
|
||||
"labels_without_colons",
|
||||
"loose_string_term",
|
||||
|
||||
@@ -151,7 +151,7 @@ static unsigned char OptionalAddrSize (void)
|
||||
static void SetBoolOption (unsigned char* Flag)
|
||||
/* Read a on/off/+/- option and set flag accordingly */
|
||||
{
|
||||
static const char* Keys[] = {
|
||||
static const char* const Keys[] = {
|
||||
"OFF",
|
||||
"ON",
|
||||
};
|
||||
@@ -451,7 +451,7 @@ static void DoASCIIZ (void)
|
||||
static void DoAssert (void)
|
||||
/* Add an assertion */
|
||||
{
|
||||
static const char* ActionTab [] = {
|
||||
static const char* const ActionTab [] = {
|
||||
"WARN", "WARNING",
|
||||
"ERROR",
|
||||
"LDWARN", "LDWARNING",
|
||||
@@ -659,7 +659,7 @@ static void DoCode (void)
|
||||
static void DoConDes (void)
|
||||
/* Export a symbol as constructor/destructor */
|
||||
{
|
||||
static const char* Keys[] = {
|
||||
static const char* const Keys[] = {
|
||||
"CONSTRUCTOR",
|
||||
"DESTRUCTOR",
|
||||
"INTERRUPTOR",
|
||||
@@ -744,7 +744,7 @@ static void DoData (void)
|
||||
static void DoDbg (void)
|
||||
/* Add debug information from high level code */
|
||||
{
|
||||
static const char* Keys[] = {
|
||||
static const char* const Keys[] = {
|
||||
"FILE",
|
||||
"FUNC",
|
||||
"LINE",
|
||||
@@ -1039,7 +1039,7 @@ static void DoFileOpt (void)
|
||||
if (CurTok.Tok == TOK_IDENT) {
|
||||
|
||||
/* Option given as keyword */
|
||||
static const char* Keys [] = {
|
||||
static const char* const Keys [] = {
|
||||
"AUTHOR", "COMMENT", "COMPILER"
|
||||
};
|
||||
|
||||
|
||||
@@ -1477,7 +1477,7 @@ CharAgain:
|
||||
|
||||
|
||||
|
||||
int GetSubKey (const char** Keys, unsigned Count)
|
||||
int GetSubKey (const char* const* Keys, unsigned Count)
|
||||
/* Search for a subkey in a table of keywords. The current token must be an
|
||||
** identifier and all keys must be in upper case. The identifier will be
|
||||
** uppercased in the process. The function returns the index of the keyword,
|
||||
|
||||
@@ -84,7 +84,7 @@ void UpcaseSVal (void);
|
||||
void NextRawTok (void);
|
||||
/* Read the next raw token from the input stream */
|
||||
|
||||
int GetSubKey (const char** Keys, unsigned Count);
|
||||
int GetSubKey (const char* const* Keys, unsigned Count);
|
||||
/* Search for a subkey in a table of keywords. The current token must be an
|
||||
** identifier and all keys must be in upper case. The identifier will be
|
||||
** uppercased in the process. The function returns the index of the keyword,
|
||||
|
||||
Reference in New Issue
Block a user