diff options
Diffstat (limited to 'recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch')
-rw-r--r-- | recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch new file mode 100644 index 0000000..d1410cd --- /dev/null +++ b/recipes-enea/bitcalc/bitcalc/0001-bitcalc-resolved-compilation-warnings.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 00f03f600f29323cc6fd1c0f484a06d31acfd51d Mon Sep 17 00:00:00 2001 | ||
2 | From: Dragos Motrea <Dragos.Motrea@enea.com> | ||
3 | Date: Thu, 13 Jul 2017 13:55:42 +0200 | ||
4 | Subject: [rt-tools][LXCR-7892][PATCHv1 1/1] bitcalc: resolved compilation | ||
5 | warnings | ||
6 | |||
7 | Two warnings resolved: functions which are candidates for 'pure' attribute and | ||
8 | an uninitialized variable. | ||
9 | |||
10 | Upstream-Status: Submitted | ||
11 | |||
12 | Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com> | ||
13 | --- | ||
14 | bitcalc/src/bitcalc.c | 2 +- | ||
15 | bitcalc/src/bitmap.h | 4 ++-- | ||
16 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/bitcalc/src/bitcalc.c b/bitcalc/src/bitcalc.c | ||
19 | index bae4c06..8a51628 100644 | ||
20 | --- a/bitcalc/src/bitcalc.c | ||
21 | +++ b/bitcalc/src/bitcalc.c | ||
22 | @@ -54,7 +54,7 @@ static size_t bitmap_stack_depth_max = 0; | ||
23 | |||
24 | static char *bitmap_str(const struct bitmap_t *set) | ||
25 | { | ||
26 | - char *str; | ||
27 | + char *str = NULL; | ||
28 | |||
29 | switch (display_format) { | ||
30 | case format_mask: | ||
31 | diff --git a/bitcalc/src/bitmap.h b/bitcalc/src/bitmap.h | ||
32 | index 17fee3a..5022dac 100644 | ||
33 | --- a/bitcalc/src/bitmap.h | ||
34 | +++ b/bitcalc/src/bitmap.h | ||
35 | @@ -61,10 +61,10 @@ extern struct bitmap_t *bitmap_alloc_from_u32_list(const char *mlist); | ||
36 | */ | ||
37 | |||
38 | /* Return 1 if bit is set in bit mask, 0 otherwise. */ | ||
39 | -extern int bitmap_isset(size_t bit, const struct bitmap_t *set); | ||
40 | +extern int bitmap_isset(size_t bit, const struct bitmap_t *set) __attribute__((pure)); | ||
41 | |||
42 | /* Return the number of bits set in bit mask. */ | ||
43 | -extern size_t bitmap_bit_count(const struct bitmap_t *set); | ||
44 | +extern size_t bitmap_bit_count(const struct bitmap_t *set) __attribute__((pure)); | ||
45 | |||
46 | /* | ||
47 | * Modify bitmap | ||
48 | -- | ||
49 | 2.7.4 | ||
50 | |||