From d83d7f7392009fc30e8688b68d5c4a7a244105f6 Mon Sep 17 00:00:00 2001 From: Jean-Marie Lemetayer Date: Thu, 19 May 2016 11:03:35 +0200 Subject: [PATCH] Fix const warning --- src/chipid.c | 2 +- src/common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chipid.c b/src/chipid.c index 92daeb2..2c92d1e 100644 --- a/src/chipid.c +++ b/src/chipid.c @@ -389,7 +389,7 @@ static const struct stlink_chipid_params devices[] = { const struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) { - struct stlink_chipid_params *params = NULL; + const struct stlink_chipid_params *params = NULL; for (size_t n = 0; n < STLINK_ARRAY_SIZE(devices); n++) { if (devices[n].chip_id == chipid) { diff --git a/src/common.c b/src/common.c index e975c0a..e61bc53 100644 --- a/src/common.c +++ b/src/common.c @@ -567,7 +567,7 @@ int stlink_cpu_id(stlink_t *sl, cortex_m3_cpuid_t *cpuid) { */ int stlink_load_device_params(stlink_t *sl) { ILOG("Loading device parameters....\n"); - struct stlink_chipid_params *params = NULL; + const struct stlink_chipid_params *params = NULL; stlink_core_id(sl); uint32_t chip_id; uint32_t flash_size;