Browse Source

warnings: use more 'const' for char *

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
tags/v0.5.0-rc1
Øyvind Harboe 13 years ago
parent
commit
4f9a9b8eba
25 changed files with 30 additions and 30 deletions
  1. +1
    -1
      src/flash/mflash.h
  2. +3
    -3
      src/flash/nand/core.h
  3. +1
    -1
      src/flash/nand/driver.h
  4. +1
    -1
      src/flash/nor/at91sam7.c
  5. +1
    -1
      src/flash/nor/core.h
  6. +1
    -1
      src/flash/nor/driver.h
  7. +1
    -1
      src/flash/nor/lpc288x.c
  8. +1
    -1
      src/flash/nor/pic32mx.c
  9. +2
    -2
      src/flash/nor/stellaris.c
  10. +2
    -2
      src/flash/nor/tms470.c
  11. +1
    -1
      src/helper/bin2char.c
  12. +1
    -1
      src/helper/command.c
  13. +1
    -1
      src/helper/command.h
  14. +1
    -1
      src/pld/pld.h
  15. +1
    -1
      src/server/server.c
  16. +1
    -1
      src/server/server.h
  17. +1
    -1
      src/target/algorithm.h
  18. +1
    -1
      src/target/arm9tdmi.c
  19. +1
    -1
      src/target/arm_disassembler.c
  20. +1
    -1
      src/target/armv7m.c
  21. +1
    -1
      src/target/dsp563xx.c
  22. +1
    -1
      src/target/dsp563xx.h
  23. +1
    -1
      src/target/etm.h
  24. +2
    -2
      src/target/register.h
  25. +1
    -1
      src/target/target_type.h

+ 1
- 1
src/flash/mflash.h View File

@@ -34,7 +34,7 @@ struct mflash_gpio_num

struct mflash_gpio_drv
{
char *name;
const char *name;
int (*set_gpio_to_output) (struct mflash_gpio_num gpio);
int (*set_gpio_output_val) (struct mflash_gpio_num gpio, uint8_t val);
};


+ 3
- 3
src/flash/nand/core.h View File

@@ -59,7 +59,7 @@ struct nand_ecclayout {

struct nand_device
{
char *name;
const char *name;
struct nand_flash_controller *controller;
void *controller_priv;
struct nand_manufacturer *manufacturer;
@@ -91,12 +91,12 @@ enum
struct nand_manufacturer
{
int id;
char *name;
const char *name;
};

struct nand_info
{
char *name;
const char *name;
int id;
int page_size;
int chip_size;


+ 1
- 1
src/flash/nand/driver.h View File

@@ -35,7 +35,7 @@ struct nand_device;
struct nand_flash_controller
{
/** Driver name that is used to select it from configuration files. */
char *name;
const char *name;

const struct command_registration *commands;



+ 1
- 1
src/flash/nor/at91sam7.c View File

@@ -125,7 +125,7 @@ struct at91sam7_flash_bank
uint16_t cidr_nvpsiz2;
uint16_t cidr_eproc;
uint16_t cidr_version;
char *target_name;
const char *target_name;

/* flash auto-detection */
uint8_t flash_autodetection;


+ 1
- 1
src/flash/nor/core.h View File

@@ -74,7 +74,7 @@ struct flash_sector
*/
struct flash_bank
{
char *name;
const char *name;

struct target *target; /**< Target to which this bank belongs. */



+ 1
- 1
src/flash/nor/driver.h View File

@@ -54,7 +54,7 @@ struct flash_driver
* Gives a human-readable name of this flash driver,
* This field is used to select and initialize the driver.
*/
char *name;
const char *name;

/**
* An array of driver-specific commands to register. When called


+ 1
- 1
src/flash/nor/lpc288x.c View File

@@ -91,7 +91,7 @@ struct lpc288x_flash_bank

/* chip id register */
uint32_t cidr;
char * target_name;
const char * target_name;
uint32_t cclk;

uint32_t sector_size_break;


+ 1
- 1
src/flash/nor/pic32mx.c View File

@@ -99,7 +99,7 @@ struct pic32mx_flash_bank

static const struct pic32mx_devs_s {
uint8_t devid;
char *name;
const char *name;
} pic32mx_devs[] = {
{0x38, "360F512L"},
{0x34, "360F256L"},


+ 2
- 2
src/flash/nor/stellaris.c View File

@@ -100,7 +100,7 @@ struct stellaris_flash_bank
uint32_t dc0;
uint32_t dc1;

char * target_name;
const char * target_name;

uint32_t sramsiz;
uint32_t flshsz;
@@ -125,7 +125,7 @@ struct stellaris_flash_bank

static struct {
uint32_t partno;
char *partname;
const char *partname;
} StellarisParts[] =
{
{0x0001,"LM3S101"},


+ 2
- 2
src/flash/nor/tms470.c View File

@@ -38,7 +38,7 @@ struct tms470_flash_bank
uint32_t technology_family;
uint32_t rom_flash;
uint32_t part_number;
char * part_name;
const char * part_name;

};

@@ -129,7 +129,7 @@ static int tms470_read_part_info(struct flash_bank *bank)
uint32_t technology_family;
uint32_t rom_flash;
uint32_t part_number;
char *part_name;
const char *part_name;

/* we shall not rely on the caller in this test, this function allocates memory,
thus and executing the code more than once may cause memory leak */


+ 1
- 1
src/helper/bin2char.c View File

@@ -29,7 +29,7 @@ int main(int argc, char **argv)
{
int c;
unsigned int n;
char *name;
const char *name;

if (argc == 1) {
fprintf(stderr, "bin2char <varname>\n");


+ 1
- 1
src/helper/command.c View File

@@ -310,7 +310,7 @@ static void command_free(struct command *c)
}

if (c->name)
free(c->name);
free((void *)c->name);
if (c->help)
free((void*)c->help);
if (c->usage)


+ 1
- 1
src/helper/command.h View File

@@ -173,7 +173,7 @@ typedef __COMMAND_HANDLER((*command_handler_t));

struct command
{
char *name;
const char *name;
const char *help;
const char *usage;
struct command *parent;


+ 1
- 1
src/pld/pld.h View File

@@ -29,7 +29,7 @@ struct pld_device;

struct pld_driver
{
char *name;
const char *name;
__PLD_DEVICE_COMMAND((*pld_device_command));
const struct command_registration *commands;
int (*load)(struct pld_device *pld_device, const char *filename);


+ 1
- 1
src/server/server.c View File

@@ -306,7 +306,7 @@ static int remove_services(void)
struct service *next = c->next;

if (c->name)
free(c->name);
free((void *)c->name);

if (c->type == CONNECTION_PIPE)
{


+ 1
- 1
src/server/server.h View File

@@ -57,7 +57,7 @@ typedef int (*connection_closed_handler_t)(struct connection *connection);

struct service
{
char *name;
const char *name;
enum connection_type type;
const char *port;
unsigned short portnumber;


+ 1
- 1
src/target/algorithm.h View File

@@ -37,7 +37,7 @@ struct mem_param

struct reg_param
{
char *reg_name;
const char *reg_name;
uint32_t size;
uint8_t *value;
enum param_direction direction;


+ 1
- 1
src/target/arm9tdmi.c View File

@@ -60,7 +60,7 @@ enum arm9tdmi_vector_bit
};

static const struct arm9tdmi_vector {
char *name;
const char *name;
uint32_t value;
} arm9tdmi_vectors[] = {
{"reset", ARM9TDMI_RESET_VECTOR},


+ 1
- 1
src/target/arm_disassembler.c View File

@@ -2354,7 +2354,7 @@ static int evaluate_add_sp_pc_thumb(uint16_t opcode,
uint8_t Rd = (opcode >> 8) & 0x7;
uint8_t Rn;
uint32_t SP = opcode & (1 << 11);
char *reg_name;
const char *reg_name;

instruction->type = ARM_ADD;



+ 1
- 1
src/target/armv7m.c View File

@@ -82,7 +82,7 @@ struct reg armv7m_gdb_dummy_cpsr_reg =
*/
static const struct {
unsigned id;
char *name;
const char *name;
unsigned bits;
} armv7m_regs[] = {
{ ARMV7M_R0, "r0", 32 },


+ 1
- 1
src/target/dsp563xx.c View File

@@ -173,7 +173,7 @@ static int dsp563xx_jtag_sendinstr(struct jtag_tap *tap, uint8_t * ir_in, uint8_
static const struct
{
unsigned id;
char *name;
const char *name;
unsigned bits;
uint32_t r_cmd;
uint32_t w_cmd;


+ 1
- 1
src/target/dsp563xx.h View File

@@ -53,7 +53,7 @@ struct dsp563xx_common
struct dsp563xx_core_reg
{
uint32_t num;
char *name;
const char *name;
uint32_t size;
uint32_t r_cmd;
uint32_t w_cmd;


+ 1
- 1
src/target/etm.h View File

@@ -139,7 +139,7 @@ struct etm_context;

struct etm_capture_driver
{
char *name;
const char *name;
const struct command_registration *commands;
int (*init)(struct etm_context *etm_ctx);
trace_status_t (*status)(struct etm_context *etm_ctx);


+ 2
- 2
src/target/register.h View File

@@ -27,7 +27,7 @@ struct target;

struct reg
{
char *name;
const char *name;
void *value;
bool dirty;
bool valid;
@@ -38,7 +38,7 @@ struct reg

struct reg_cache
{
char *name;
const char *name;
struct reg_cache *next;
struct reg *reg_list;
unsigned num_regs;


+ 1
- 1
src/target/target_type.h View File

@@ -42,7 +42,7 @@ struct target_type
* Name of this type of target. Do @b not access this
* field directly, use target_type_name() instead.
*/
char *name;
const char *name;

/* poll current target status */
int (*poll)(struct target *target);


Loading…
Cancel
Save