diff options
author | Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> | 2019-08-14 10:59:21 +0900 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2020-11-20 14:00:58 -0800 |
commit | 20c136159b37f11822b591941c077bb2be6ede05 (patch) | |
tree | 42f03df3fac168e2914ede352bf292382e133eac /libparted/fs/r/fat/count.c | |
parent | bed9c6a17ee82c87bf47981149e224f2e34baedb (diff) | |
download | parted-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/fat/count.c')
-rw-r--r-- | libparted/fs/r/fat/count.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libparted/fs/r/fat/count.c b/libparted/fs/r/fat/count.c index 250e80d..2b65e72 100644 --- a/libparted/fs/r/fat/count.c +++ b/libparted/fs/r/fat/count.c @@ -338,7 +338,7 @@ fat_collect_cluster_info (PedFileSystem* fs) { return 1; } -FatClusterFlag +FatClusterFlag _GL_ATTRIBUTE_PURE fat_get_cluster_flag (PedFileSystem* fs, FatCluster cluster) { FatSpecific* fs_info = FAT_SPECIFIC (fs); @@ -346,7 +346,7 @@ fat_get_cluster_flag (PedFileSystem* fs, FatCluster cluster) return fs_info->cluster_info [cluster].flag; } -PedSector +PedSector _GL_ATTRIBUTE_PURE fat_get_cluster_usage (PedFileSystem* fs, FatCluster cluster) { FatSpecific* fs_info = FAT_SPECIFIC (fs); |