diff options
author | Jim Meyering <meyering@redhat.com> | 2011-12-03 14:57:26 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-12-03 15:43:33 +0100 |
commit | e2554c4ce2987a9c7f9dfdbce5a5dde5542c0b65 (patch) | |
tree | e73509f834c4f97727e0c0dda5ef103fb148a3a8 /parted/ui.c | |
parent | e9584920f6fe74545be7bced530774ebde624572 (diff) | |
download | parted-e2554c4ce2987a9c7f9dfdbce5a5dde5542c0b65.tar.gz |
build: mark functions with "const" or "pure" attribute, per gcc warnings
Use _GL_ATTRIBUTE_PURE or _GL_ATTRIBUTE_CONST. Mark static functions at
point of definition; extern ones at point of declaration.
* include/parted/crc32.h:
* include/parted/device.h: Likewise.
* include/parted/disk.h: Likewise.
* include/parted/exception.h: Likewise.
* include/parted/filesys.h: Likewise.
* include/parted/geom.h: Likewise.
* include/parted/natmath.h: Likewise.
* include/parted/parted.h: Likewise.
* include/parted/unit.h: Likewise.
* libparted/arch/linux.c: Likewise.
* libparted/disk.c: Likewise.
* libparted/exception.c: Likewise.
* libparted/fs/amiga/amiga.h: Likewise.
* libparted/labels/aix.c: Likewise.
* libparted/labels/bsd.c: Likewise.
* libparted/labels/dos.c: Likewise.
* libparted/labels/dvh.c: Likewise.
* libparted/labels/efi_crc32.c: Likewise.
* libparted/labels/gpt.c: Likewise.
* libparted/labels/mac.c: Likewise.
* libparted/labels/pc98.c: Likewise.
* libparted/labels/rdb.c: Likewise.
* libparted/labels/sun.c: Likewise.
* libparted/unit.c: Likewise.
* parted/ui.c: Likewise.
* parted/strlist.c: Likewise.
* parted/strlist.h: Likewise.
* libparted/tests/common.h (_implemented_disk_label): Mark as pure.
* libparted/cs/natmath.c (extended_euclid): Mark as pure.
Diffstat (limited to 'parted/ui.c')
-rw-r--r-- | parted/ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/parted/ui.c b/parted/ui.c index 1def754..f0d663e 100644 --- a/parted/ui.c +++ b/parted/ui.c @@ -592,7 +592,7 @@ _readline (const char* prompt, const StrList* possibilities) return line; } -static PedExceptionOption +static PedExceptionOption _GL_ATTRIBUTE_PURE option_get_next (PedExceptionOption options, PedExceptionOption current) { PedExceptionOption i; @@ -704,7 +704,7 @@ command_line_get_word_count () return str_list_length (command_line); } -static int +static int _GL_ATTRIBUTE_PURE _str_is_spaces (const char* str) { while (isspace (*str)) |