diff options
author | Karel Zak | 2018-07-23 11:43:47 +0200 |
---|---|---|
committer | Karel Zak | 2018-07-23 11:43:47 +0200 |
commit | 58bc493243548a546291fe23720e9961472e3681 (patch) | |
tree | e13019a7da4ac6bd54a2be07a5b0dc8845372c4d | |
parent | mkswap: fix compiler warnings [-Wcast-qual] (diff) | |
download | kernel-qcow2-util-linux-58bc493243548a546291fe23720e9961472e3681.tar.gz kernel-qcow2-util-linux-58bc493243548a546291fe23720e9961472e3681.tar.xz kernel-qcow2-util-linux-58bc493243548a546291fe23720e9961472e3681.zip |
swapon: fix compiler warnings [-Wcast-qual]
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | sys-utils/swapon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 4ef2f1c9d..357dcb3f7 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -462,12 +462,12 @@ static unsigned long long swap_get_size(const struct swap_device *dev, { unsigned int last_page = 0; const unsigned int swap_version = SWAP_VERSION; - struct swap_header_v1_2 *s; + const struct swap_header_v1_2 *s; assert(dev); assert(dev->pagesize > 0); - s = (struct swap_header_v1_2 *) hdr; + s = (const struct swap_header_v1_2 *) hdr; if (s->version == swap_version) last_page = s->last_page; @@ -479,7 +479,7 @@ static unsigned long long swap_get_size(const struct swap_device *dev, static void swap_get_info(struct swap_device *dev, const char *hdr) { - struct swap_header_v1_2 *s = (struct swap_header_v1_2 *) hdr; + const struct swap_header_v1_2 *s = (const struct swap_header_v1_2 *) hdr; assert(dev); |