summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libfdisk/src/dos.c4
-rw-r--r--libfdisk/src/gpt.c4
-rw-r--r--libfdisk/src/sgi.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 41784053c..f73516460 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -2153,8 +2153,8 @@ static void print_chain_of_logicals(struct fdisk_context *cxt)
static int cmp_ebr_offsets(const void *a, const void *b)
{
- struct pte *ae = (struct pte *) a,
- *be = (struct pte *) b;
+ const struct pte *ae = (const struct pte *) a,
+ *be = (const struct pte *) b;
if (ae->offset == 0 && be->offset == 0)
return 0;
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
index 4d34ca78c..1ceb4f571 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
@@ -3000,8 +3000,8 @@ static int gpt_toggle_partition_flag(
static int gpt_entry_cmp_start(const void *a, const void *b)
{
- struct gpt_entry *ae = (struct gpt_entry *) a,
- *be = (struct gpt_entry *) b;
+ const struct gpt_entry *ae = (const struct gpt_entry *) a,
+ *be = (const struct gpt_entry *) b;
int au = gpt_entry_is_used(ae),
bu = gpt_entry_is_used(be);
diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
index fd40f533f..19d799205 100644
--- a/libfdisk/src/sgi.c
+++ b/libfdisk/src/sgi.c
@@ -510,8 +510,8 @@ static int compare_start(struct fdisk_context *cxt,
* Sort according to start sectors and prefer the largest partition:
* entry zero is the entire-disk entry.
*/
- unsigned int i = *(int *) x;
- unsigned int j = *(int *) y;
+ const unsigned int i = *(const int *) x;
+ const unsigned int j = *(const int *) y;
unsigned int a = sgi_get_start_sector(cxt, i);
unsigned int b = sgi_get_start_sector(cxt, j);
unsigned int c = sgi_get_num_sectors(cxt, i);