summaryrefslogtreecommitdiff
path: root/libparted/fs/r/hfs/advfs.c
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>2019-08-14 10:59:21 +0900
committerBrian C. Lane <bcl@redhat.com>2020-11-20 14:00:58 -0800
commit20c136159b37f11822b591941c077bb2be6ede05 (patch)
tree42f03df3fac168e2914ede352bf292382e133eac /libparted/fs/r/hfs/advfs.c
parentbed9c6a17ee82c87bf47981149e224f2e34baedb (diff)
downloadparted-20c136159b37f11822b591941c077bb2be6ede05.tar.gz
libparted: Fix warnings from GCC 8 -Wsuggest-attribute=pure
As GCC 8 suggests, add 'pure' attribute to 17 functions. After adding pure attributes, GCC suggested three more functions to add pure attributes. Add pure attribute to those functions also. In total, add pure attributes to 20 functions. I read code of the functions and confirmed the 20 functions are pure: they have no effect except the return value, and their return value depend only on the parameters and/or global variables. Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'libparted/fs/r/hfs/advfs.c')
-rw-r--r--libparted/fs/r/hfs/advfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libparted/fs/r/hfs/advfs.c b/libparted/fs/r/hfs/advfs.c
index d0afa30..0a39960 100644
--- a/libparted/fs/r/hfs/advfs.c
+++ b/libparted/fs/r/hfs/advfs.c
@@ -239,7 +239,7 @@ errbb: hfs_free_bad_blocks_list(priv_data->bad_blocks_xtent_list);
}
/* This function check if fblock is a bad block */
-int
+int _GL_ATTRIBUTE_PURE
hfs_is_bad_block (const PedFileSystem *fs, unsigned int fblock)
{
HfsPrivateFSData* priv_data = (HfsPrivateFSData*)
@@ -304,7 +304,7 @@ hfs_get_empty_end (const PedFileSystem *fs)
/* return the block which should be used to pack data to have at
least free fblock blocks at the end of the volume */
-unsigned int
+unsigned int _GL_ATTRIBUTE_PURE
hfs_find_start_pack (const PedFileSystem *fs, unsigned int fblock)
{
HfsPrivateFSData* priv_data = (HfsPrivateFSData*)