summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordann frazier <dann.frazier@canonical.com>2018-08-31 09:28:27 -0600
committerBrian C. Lane <bcl@redhat.com>2018-10-16 13:50:11 -0700
commit3262e2fe9ec93ad2c24e1b117bf87fb6f4b6ffec (patch)
tree7703b4b55999b666a94685dd8ae71d88e6bfc505 /include
parent749b42f25534bec8625e74a6c1c61c3ad6cc8b17 (diff)
downloadparted-3262e2fe9ec93ad2c24e1b117bf87fb6f4b6ffec.tar.gz
ped_unit_get_name: Resolve conflicting attributes 'const' and 'pure'
The const and pure attributes conflict: error: ignoring attribute 'const' because it conflicts with attribute 'pure' [-Werror=attributes] pure functions may access global memory, const functions may not. ped_unit_get_name() accesses non-local variable unit_names, so drop const. Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/parted/unit.in.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/parted/unit.in.h b/include/parted/unit.in.h
index 9d6e06a..315660d 100644
--- a/include/parted/unit.in.h
+++ b/include/parted/unit.in.h
@@ -66,7 +66,7 @@ typedef enum {
extern long long ped_unit_get_size (const PedDevice* dev, PedUnit unit);
extern const char *ped_unit_get_name (PedUnit unit)
- _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_CONST;
+ _GL_ATTRIBUTE_PURE;
extern PedUnit ped_unit_get_by_name (const char* unit_name) _GL_ATTRIBUTE_PURE;
extern void ped_unit_set_default (PedUnit unit);