parted/0101-ped_unit_get_name-Resolve-conflicting-attributes-con.patch
Brian C. Lane 8f615e462d - Read NVMe model names from sysfs (dann.frazier)
- Fix warnings from GCC 7's -Wimplicit-fallthrough (dann.frazier)
- ped_unit_get_name: Resolve conflicting attributes 'const' and 'pure' (dann.frazier)
- Add udf to t1700-probe-fs and to the manpage (bcl)
- libparted: Add support for MBR id, GPT GUID and detection of UDF filesystem (pali.rohar)
- Fix potential command line buffer overflow (xu.simon)
- t6100-mdraid-partitions: Use v0.90 metadata for the test (bcl)
- parted.c: Make sure dev_name is freed (bcl)
- parted.c: Always free peek_word (bcl)
- Fix the length of several strncpy calls (bcl)
2018-10-16 15:38:03 -07:00

35 lines
1.2 KiB
Diff

From 3262e2fe9ec93ad2c24e1b117bf87fb6f4b6ffec Mon Sep 17 00:00:00 2001
From: dann frazier <dann.frazier@canonical.com>
Date: Fri, 31 Aug 2018 09:28:27 -0600
Subject: [PATCH 101/103] 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>
---
include/parted/unit.in.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.17.2