]> git.pld-linux.org Git - packages/parted.git/blob - 0101-ped_unit_get_name-Resolve-conflicting-attributes-con.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0101-ped_unit_get_name-Resolve-conflicting-attributes-con.patch
1 From 3262e2fe9ec93ad2c24e1b117bf87fb6f4b6ffec Mon Sep 17 00:00:00 2001
2 From: dann frazier <dann.frazier@canonical.com>
3 Date: Fri, 31 Aug 2018 09:28:27 -0600
4 Subject: [PATCH 101/103] ped_unit_get_name: Resolve conflicting attributes
5  'const' and 'pure'
6
7 The const and pure attributes conflict:
8
9   error: ignoring attribute 'const' because it conflicts with attribute 'pure' [-Werror=attributes]
10
11 pure functions may access global memory, const functions may not.
12 ped_unit_get_name() accesses non-local variable unit_names, so drop const.
13
14 Signed-off-by: Brian C. Lane <bcl@redhat.com>
15 ---
16  include/parted/unit.in.h | 2 +-
17  1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/include/parted/unit.in.h b/include/parted/unit.in.h
20 index 9d6e06a..315660d 100644
21 --- a/include/parted/unit.in.h
22 +++ b/include/parted/unit.in.h
23 @@ -66,7 +66,7 @@ typedef enum {
24  
25  extern long long ped_unit_get_size (const PedDevice* dev, PedUnit unit);
26  extern const char *ped_unit_get_name (PedUnit unit)
27 -  _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_CONST;
28 +  _GL_ATTRIBUTE_PURE;
29  extern PedUnit ped_unit_get_by_name (const char* unit_name) _GL_ATTRIBUTE_PURE;
30  
31  extern void ped_unit_set_default (PedUnit unit);
32 -- 
33 2.17.2
34
This page took 0.073233 seconds and 3 git commands to generate.