Hi, Since nobody responded the last time, I am resending this patch as-is. I am still hitting this problem when building latest git version with GCC 4.5.1. Normally this would be a warning, but since udisks builds with -Werror by default, it breaks the build.
If you don't think this is the right way to go about this, I'm open to suggestions; I'm willing to do extra work to get this fixed. Regards, Marti On Wed, May 19, 2010 at 22:03, Marti Raudsepp <ma...@juffo.org> wrote: > When building the current UDisks version from git I get the following error: > > make[4]: Entering directory > `/usr/src/builds/udisks-git/src/udisks-build/src/helpers' > [...] > cc1: warnings being treated as errors > partutil.c: In function ‘part_add_change_partition’: > partutil.c:1459:5: error: case value ‘4294967295’ not in enumerated > type ‘PartitionScheme’ > > The fix (below) is quite simple, but I don't know if it's the right > way to go about this... Adding PART_TYPE_UNKNOWN to the enumeration > seemed like an overkill for this one-off case.
From 06c0bf81adac1c962858a38986565c23227b8d39 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp <ma...@juffo.org> Date: Wed, 20 Oct 2010 19:10:57 +0300 Subject: [PATCH] partutil.c: Avoid GCC 4.5 error with 'case -1' statement on enum type. Before this, building with GCC 4.5.1 failed with the following error: partutil.c:1459:5: error: case value '4294967295' not in enumerated type 'PartitionScheme' --- src/helpers/partutil.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/helpers/partutil.c b/src/helpers/partutil.c index 63d3422..86668dd 100644 --- a/src/helpers/partutil.c +++ b/src/helpers/partutil.c @@ -1454,7 +1454,7 @@ part_add_change_partition (char *device_file, } /* now that we know the partitoning scheme, sanity check type and flags */ - switch (scheme) + switch ((int) scheme) { case -1: /* unknown partition table format; error out if any type, label or flags are given */ -- 1.7.3.1
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel