Merge pull request #214 from falstaff84/const-strings-and-structs
Constify strings and constant structs
This commit is contained in:
commit
146c0b83b5
|
@ -33,7 +33,7 @@
|
|||
#include "target.h"
|
||||
#include "target_internal.h"
|
||||
|
||||
static char cortexa_driver_str[] = "ARM Cortex-A";
|
||||
static const char cortexa_driver_str[] = "ARM Cortex-A";
|
||||
|
||||
static bool cortexa_attach(target *t);
|
||||
static void cortexa_detach(target *t);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
static char cortexm_driver_str[] = "ARM Cortex-M";
|
||||
static const char cortexm_driver_str[] = "ARM Cortex-M";
|
||||
|
||||
static bool cortexm_vector_catch(target *t, int argc, char *argv[]);
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
struct jtag_dev_s jtag_devs[JTAG_MAX_DEVS+1];
|
||||
int jtag_dev_count;
|
||||
|
||||
static struct jtag_dev_descr_s {
|
||||
uint32_t idcode;
|
||||
uint32_t idmask;
|
||||
char *descr;
|
||||
void (*handler)(jtag_dev_t *dev);
|
||||
static const struct jtag_dev_descr_s {
|
||||
const uint32_t idcode;
|
||||
const uint32_t idmask;
|
||||
const char * const descr;
|
||||
void (*const handler)(jtag_dev_t *dev);
|
||||
} dev_descr[] = {
|
||||
{.idcode = 0x0BA00477, .idmask = 0x0FFF0FFF,
|
||||
.descr = "ARM Limited: ADIv5 JTAG-DP port.",
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef struct jtag_dev_s {
|
|||
uint8_t ir_postscan;
|
||||
|
||||
uint32_t idcode;
|
||||
char *descr;
|
||||
const char *descr;
|
||||
|
||||
uint32_t current_ir;
|
||||
|
||||
|
|
Loading…
Reference in New Issue