[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint: avoid new compiler warnings
From: |
Jim Meyering |
Subject: |
[PATCH] maint: avoid new compiler warnings |
Date: |
Wed, 16 Mar 2011 19:36:22 +0100 |
Building with ./configure --enable-gcc-warnings,
I got a couple new warnings. This fixes them:
>From da59b16ca8c22625507a1c52a86abd7e24791826 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 16 Mar 2011 18:56:06 +0100
Subject: [PATCH] maint: avoid new compiler warnings
* parted/parted.c (do_print): Remove now-unused "error" label.
(_print_disk_info): Use one more "const" attribute, to avoid
compiler warnings.
---
parted/parted.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index 35bfaf3..c4cf959 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -1405,7 +1405,7 @@ _print_disk_geometry (const PedDevice *dev)
static void
_print_disk_info (const PedDevice *dev, const PedDisk *disk)
{
- char *const transport[] = {"unknown", "scsi", "ide", "dac960",
+ char const *const transport[] = {"unknown", "scsi", "ide", "dac960",
"cpqarray", "file", "ataraid", "i2o",
"ubd", "dasd", "viodasd", "sx8", "dm",
"xvd", "sd/mmc", "virtblk", "aoe",
@@ -1714,7 +1714,6 @@ do_print (PedDevice** dev)
error_destroy_disk:
ped_disk_destroy (disk);
-error:
return 0;
nopt:
return 1;
--
1.7.4.1.430.g5aa4d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] maint: avoid new compiler warnings,
Jim Meyering <=