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/calc.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/calc.c')
-rw-r--r-- | libparted/fs/r/fat/calc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libparted/fs/r/fat/calc.c b/libparted/fs/r/fat/calc.c index e524007..60c6bac 100644 --- a/libparted/fs/r/fat/calc.c +++ b/libparted/fs/r/fat/calc.c @@ -314,7 +314,7 @@ fat_calc_resize_sizes ( friends, to allow room for this space. If too much of this space is left over, everyone will complain, so we have to be greedy, and use it all up... */ -PedSector +PedSector _GL_ATTRIBUTE_PURE fat_calc_align_sectors (const PedFileSystem* new_fs, const PedFileSystem* old_fs) { @@ -359,7 +359,7 @@ fat_calc_align_sectors (const PedFileSystem* new_fs, return align; } -int +int _GL_ATTRIBUTE_PURE fat_is_sector_in_clusters (const PedFileSystem* fs, PedSector sector) { FatSpecific* fs_info = FAT_SPECIFIC (fs); |