From 2d37de773c4a19836e1d7738f16353b7e258eb2b Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 19 Oct 2016 14:36:27 -0700 Subject: [PATCH 1/3] Fixed #include guard. --- src/platforms/common/timing.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/common/timing.h b/src/platforms/common/timing.h index 39b58e56..cc7971e8 100644 --- a/src/platforms/common/timing.h +++ b/src/platforms/common/timing.h @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef __TIMING__H +#ifndef __TIMING_H #define __TIMING_H struct platform_timeout { @@ -26,5 +26,5 @@ struct platform_timeout { uint32_t platform_time_ms(void); -#endif +#endif /* __TIMING_H */ From 4348f0d135710167a789993cab6d1e8253de62cf Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 19 Oct 2016 14:37:03 -0700 Subject: [PATCH 2/3] Fixed double const. The way the const pointer was written caused at least the clang compiler to complain about double cosnst. I am not sure if the way it was written before it resulted in the intended "make everything const" goal. But the way it is written now it adheres to the right to left reading rule. --- src/target/adiv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/adiv5.c b/src/target/adiv5.c index d530ecbe..3fa76735 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -78,7 +78,7 @@ enum cid_class { #ifdef PLATFORM_HAS_DEBUG /* The reserved ones only have an R in them, to save a bit of space. */ -static const char const *cidc_debug_strings[] = +static const char * const cidc_debug_strings[] = { [cidc_gvc] = "Generic verification component", /* 0x0 */ [cidc_romtab] = "ROM Table", /* 0x1 */ From fdeb6471a812f80d9d497cdeee26b75f2d992850 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 19 Oct 2016 14:56:52 -0700 Subject: [PATCH 3/3] Added missing #include guard. --- src/platforms/stm32/usbdfu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/stm32/usbdfu.h b/src/platforms/stm32/usbdfu.h index df68b85a..3f5b3f8b 100644 --- a/src/platforms/stm32/usbdfu.h +++ b/src/platforms/stm32/usbdfu.h @@ -17,6 +17,9 @@ * along with this program. If not, see . */ +#ifndef __USBDFU_H +#define __USBDFU_H + #include /* Commands sent with wBlockNum == 0 as per ST implementation. */ @@ -44,3 +47,4 @@ void dfu_event(void); /* Platform specific function */ void dfu_detach(void); +#endif /* __USBDFU_H */