[Parted-maintainers] Bug#292937: marked as done (parted: FTBFS
(amd64/gcc-4.0): static declaration of 'ped_constraint_none'
follows non-static declaration)
Debian Bug Tracking System
owner at bugs.debian.org
Sat Jul 16 23:03:27 UTC 2005
Your message dated Sat, 16 Jul 2005 23:55:28 +0200
with message-id <20050716215528.GA6850 at pegasos>
and subject line The amd64 autobuilder built parted 1.6.23-1, so this is probably fixed.
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 31 Jan 2005 10:49:40 +0000
>From aj at andaco.de Mon Jan 31 02:49:34 2005
Return-path: <aj at andaco.de>
Received: from d164124.adsl.hansenet.de (localhost.localdomain) [80.171.164.124]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CvZ7c-0002bo-00; Mon, 31 Jan 2005 02:49:32 -0800
Received: from aj by localhost.localdomain with local (Exim 4.34)
id 1CvZ7a-0000FS-8Z; Mon, 31 Jan 2005 11:49:30 +0100
To: Debian Bug Tracking System <submit at bugs.debian.org>
From: Andreas Jochens <aj at andaco.de>
Subject: parted: FTBFS (amd64/gcc-4.0): static declaration of 'ped_constraint_none' follows non-static declaration
Message-Id: <E1CvZ7a-0000FS-8Z at localhost.localdomain>
Date: Mon, 31 Jan 2005 11:49:30 +0100
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Package: parted
Severity: normal
Tags: patch
When building 'parted' on amd64 with gcc-4.0,
I get the following error:
x86_64-linux-gcc -DHAVE_CONFIG_H -I. -I../../../libparted/fs_fat -I../.. -I../../../include -g -O2 -D_REENTRANT -D_FILE_OFFSET_BITS=no -DLOCALEDIR=\"/usr/share/locale\" -DLOCALEDIR=\"/usr/share/locale\" -W -Wall -Wno-unused -Wno-switch -Wno-format -Werror -MT context.lo -MD -MP -MF .deps/context.Tpo -c ../../../libparted/fs_fat/context.c -fPIC -DPIC -o .libs/context.o
cc1: warnings being treated as errors
../../../libparted/fs_fat/context.c: In function 'fat_op_context_new':
../../../libparted/fs_fat/context.c:94: warning: pointer targets in assignment differ in signedness
make[4]: *** [context.lo] Error 1
make[4]: Leaving directory `/parted-1.6.21/build-deb/libparted/fs_fat'
There are some more of those warnings. After fixing those warnings or
switching them off with 'CONFFLAGS += --disable-Werror' in debian/rules,
I get the following error:
x86_64-linux-gcc -DHAVE_CONFIG_H -I. -I../../libparted -I.. -I../../include -g-O2 -D_REENTRANT -D_FILE_OFFSET_BITS=no -DLOCALEDIR=\"/usr/share/locale\" -DLOCALEDIR=\"/usr/share/locale\" -W -Wall -Wno-unused -Wno-switch -Wno-format -MT constraint.lo -MD -MP -MF .deps/constraint.Tpo -c ../../libparted/constraint.c -fPIC -DPIC -o .libs/constraint.o
../../libparted/constraint.c:23: error: static declaration of 'ped_constraint_none' follows non-static declaration
../../include/parted/constraint.h:96: error: previous declaration of 'ped_constraint_none' was here
make[4]: *** [constraint.lo] Error 1
make[4]: Leaving directory `/srv/dbuild/tmp/parted-1.6.21/build-deb/libparted'
With the attached patch 'parted' can be compiled
on amd64 using gcc-4.0.
The patch adds a new file 'debian/patches/gcc4-fix.dpatch'.
It also corrects two causes for gcc4 warnings in 'debian/patches/hfs.dpatch'.
The last one of those two corrections replaces 'node' with 'node_1'.
This looks like a good example where the stricter warnings of gcc4 serve
to find a real error in the code.
Regards
Andreas Jochens
diff -urN ../tmp-orig/parted-1.6.21/debian/patches/00list ./debian/patches/00list
--- ../tmp-orig/parted-1.6.21/debian/patches/00list 2005-01-31 11:26:53.644278220 +0100
+++ ./debian/patches/00list 2005-01-31 11:18:56.722381052 +0100
@@ -2,6 +2,7 @@
doc-package
reiserfs-libname
# Patch susceptible to be merged upstrea,
+gcc4-fix
hfs
errors-to-stderr
devfs
diff -urN ../tmp-orig/parted-1.6.21/debian/patches/gcc4-fix.dpatch ./debian/patches/gcc4-fix.dpatch
--- ../tmp-orig/parted-1.6.21/debian/patches/gcc4-fix.dpatch 1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/gcc4-fix.dpatch 2005-01-31 11:18:56.722381052 +0100
@@ -0,0 +1,147 @@
+#! /bin/sh -e
+## gcc4-fix.dpatch by Andres Jochens <aj at andaco.de>
+##
+## DP: Fixes for compilation with gcc4
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+diff -urN ../tmp-orig/parted-1.6.21/include/parted/constraint.h ./include/parted/constraint.h
+--- ../tmp-orig/parted-1.6.21/include/parted/constraint.h 2005-01-04 17:09:50.000000000 +0100
++++ ./include/parted/constraint.h 2005-01-31 11:01:24.151652795 +0100
+@@ -93,7 +93,5 @@
+ extern PedConstraint*
+ ped_constraint_exact (const PedGeometry* geom);
+
+-extern const PedConstraint* ped_constraint_none;
+-
+ #endif /* PED_CONSTRAINT_H_INCLUDED */
+
+diff -urN ../tmp-orig/parted-1.6.21/libparted/disk_amiga.c ./libparted/disk_amiga.c
+--- ../tmp-orig/parted-1.6.21/libparted/disk_amiga.c 2005-01-06 00:16:52.000000000 +0100
++++ ./libparted/disk_amiga.c 2005-01-31 11:10:40.786155918 +0100
+@@ -813,7 +813,7 @@
+ partition->pb_Flags = PED_CPU_TO_BE32(0);
+ /* TODO : use a scheme including the device name and the
+ * partition number, if it is possible */
+- _amiga_set_bstr("dhx", partition->pb_DriveName, 32);
++ _amiga_set_bstr("dhx", (char*)partition->pb_DriveName, 32);
+
+ partition->de_TableSize = PED_CPU_TO_BE32(19);
+ partition->de_SizeBlock = PED_CPU_TO_BE32(128);
+@@ -1001,7 +1001,7 @@
+ PED_ASSERT (part->disk_specific != NULL, return);
+
+ partition = PART(part->disk_specific);
+- _amiga_set_bstr(name, partition->pb_DriveName, 32);
++ _amiga_set_bstr(name, (char*)partition->pb_DriveName, 32);
+ }
+ static const char*
+ amiga_partition_get_name (const PedPartition* part)
+@@ -1013,7 +1013,7 @@
+
+ partition = PART(part->disk_specific);
+
+- return _amiga_get_bstr(partition->pb_DriveName);
++ return _amiga_get_bstr((char*)partition->pb_DriveName);
+ }
+
+ static PedConstraint*
+diff -urN ../tmp-orig/parted-1.6.21/libparted/disk_gpt.c ./libparted/disk_gpt.c
+--- ../tmp-orig/parted-1.6.21/libparted/disk_gpt.c 2005-01-04 17:09:51.000000000 +0100
++++ ./libparted/disk_gpt.c 2005-01-31 11:03:22.761746894 +0100
+@@ -382,8 +382,8 @@
+ ped_geometry_init (&gpt_disk_data->data_area, dev, data_start,
+ data_end - data_start + 1);
+ gpt_disk_data->entry_count = GPT_DEFAULT_PARTITION_ENTRIES;
+- uuid_generate ((char*) &gpt_disk_data->uuid);
+- swap_uuid_and_efi_guid((char*)(&gpt_disk_data->uuid));
++ uuid_generate ((unsigned char*) &gpt_disk_data->uuid);
++ swap_uuid_and_efi_guid((unsigned char*)(&gpt_disk_data->uuid));
+ return disk;
+
+ error_free_disk:
+@@ -872,8 +872,8 @@
+ gpt_part_data->raid = 0;
+ gpt_part_data->boot = 0;
+ gpt_part_data->hp_service = 0;
+- uuid_generate ((char*) &gpt_part_data->uuid);
+- swap_uuid_and_efi_guid((char*)(&gpt_part_data->uuid));
++ uuid_generate ((unsigned char*) &gpt_part_data->uuid);
++ swap_uuid_and_efi_guid((unsigned char*)(&gpt_part_data->uuid));
+ strcpy (gpt_part_data->name, "");
+ return part;
+
+diff -urN ../tmp-orig/parted-1.6.21/libparted/disk_pc98.c ./libparted/disk_pc98.c
+--- ../tmp-orig/parted-1.6.21/libparted/disk_pc98.c 2004-08-15 14:34:39.000000000 +0200
++++ ./libparted/disk_pc98.c 2005-01-31 11:04:25.695593152 +0100
+@@ -381,7 +381,7 @@
+ pc98_data->boot = GET_BIT(raw_part->mid, 7);
+ pc98_data->hidden = !GET_BIT(raw_part->sid, 7);
+
+- ped_partition_set_name (part, raw_part->name);
++ ped_partition_set_name (part, (char*) raw_part->name);
+
+ pc98_data->ipl_sector = chs_to_sector (
+ disk->dev,
+diff -urN ../tmp-orig/parted-1.6.21/libparted/disk_sun.c ./libparted/disk_sun.c
+--- ../tmp-orig/parted-1.6.21/libparted/disk_sun.c 2005-01-06 00:16:52.000000000 +0100
++++ ./libparted/disk_sun.c 2005-01-31 11:04:51.541601789 +0100
+@@ -201,7 +201,7 @@
+ PED_CPU_TO_BE32(hw_geom->cylinders * cyl_size);
+
+ /* Now a neato string to describe this label */
+- snprintf(label->info, sizeof(label->info) - 1,
++ snprintf((char*)label->info, sizeof(label->info) - 1,
+ "GNU Parted Custom cyl %d alt 2 hd %d sec %d",
+ PED_BE16_TO_CPU(label->ncyl), PED_BE16_TO_CPU(label->ntrks),
+ PED_BE16_TO_CPU(label->nsect));
+diff -urN ../tmp-orig/parted-1.6.21/libparted/fs_fat/context.c ./libparted/fs_fat/context.c
+--- ../tmp-orig/parted-1.6.21/libparted/fs_fat/context.c 2002-01-01 17:17:02.000000000 +0100
++++ ./libparted/fs_fat/context.c 2005-01-31 10:53:28.604490139 +0100
+@@ -90,7 +90,7 @@
+ goto error;
+
+ ctx->buffer_frags = old_fs_info->buffer_sectors / ctx->frag_sectors;
+- ctx->buffer_map = (FatCluster*) ped_malloc (sizeof (FatFragment)
++ ctx->buffer_map = (FatFragment*) ped_malloc (sizeof (FatFragment)
+ * ctx->buffer_frags);
+ if (!ctx->buffer_map)
+ goto error_free_ctx;
+diff -urN ../tmp-orig/parted-1.6.21/libparted/fs_fat/count.c ./libparted/fs_fat/count.c
+--- ../tmp-orig/parted-1.6.21/libparted/fs_fat/count.c 2002-05-17 14:16:16.000000000 +0200
++++ ./libparted/fs_fat/count.c 2005-01-31 10:54:42.675185657 +0100
+@@ -188,7 +188,8 @@
+ fs_info->total_dir_clusters++;
+
+ fs_info->cluster_info [clst].flag = flag;
+- fs_info->cluster_info [clst].units_used = 64;
++ fs_info->cluster_info [clst].units_used = 63;
++ fs_info->cluster_info [clst].units_used++;
+ }
+
+ if (size
+diff -urN ../tmp-orig/parted-1.6.21/libparted/fs_fat/traverse.c ./libparted/fs_fat/traverse.c
+--- ../tmp-orig/parted-1.6.21/libparted/fs_fat/traverse.c 2002-04-08 01:06:22.000000000 +0200
++++ ./libparted/fs_fat/traverse.c 2005-01-31 10:57:17.638259293 +0100
+@@ -347,7 +347,7 @@
+ int i;
+ char *src;
+
+- src = dir_entry->name;
++ src = (char*) dir_entry->name;
+
+ for (i=0; i<8; i++) {
+ if (src[i] == ' ' || src[i] == 0) break;
+diff -urN ../tmp-orig/parted-1.6.21/libparted/linux.c ./libparted/linux.c
+--- ../tmp-orig/parted-1.6.21/libparted/linux.c 2005-01-16 02:01:57.000000000 +0100
++++ ./libparted/linux.c 2005-01-31 11:12:59.321402086 +0100
+@@ -519,7 +519,7 @@
+ /* hdi.model is not guaranteed to be NULL terminated */
+ memcpy (hdi_buf, hdi.model, 40);
+ hdi_buf[40] = '\0';
+- dev->model = strip_name (hdi.model);
++ dev->model = strip_name ((char*)hdi.model);
+ }
+
+ if (!_device_probe_geometry (dev))
diff -urN ../tmp-orig/parted-1.6.21/debian/patches/hfs.dpatch ./debian/patches/hfs.dpatch
--- ../tmp-orig/parted-1.6.21/debian/patches/hfs.dpatch 2005-01-31 11:26:53.641278799 +0100
+++ ./debian/patches/hfs.dpatch 2005-01-31 11:26:44.183105355 +0100
@@ -6552,7 +6552,7 @@
+ new_start = hfs_do_move(fs, ptr_fblock, ptr_to_fblock, cache, ref);
+ if (new_start == -1) return -1;
+ if (new_start > old_start) { /* detect 2 pass reloc */
-+ new_start = hfs_do_move(fs,&new_start,ptr_to_fblock,cache,ref);
++ new_start = hfs_do_move(fs,(unsigned*)&new_start,ptr_to_fblock,cache,ref);
+ if (new_start == -1 || new_start > old_start) return -1;
+ }
+ return 1;
@@ -7471,7 +7471,7 @@
+ uint8_t node_1[PED_SECTOR_SIZE];
+ uint8_t* node;
+ HfsPHeaderRecord* header;
-+ HfsPNodeDescriptor* desc = (HfsPNodeDescriptor*) node;
++ HfsPNodeDescriptor* desc = (HfsPNodeDescriptor*) node_1;
+ HfsPExtentKey* extent_key;
+ HfsPExtDescriptor* extent;
+ unsigned int leaf_node, record_number;
---------------------------------------
Received: (at 292937-done) by bugs.debian.org; 16 Jul 2005 22:02:33 +0000
>From sven.luther at wanadoo.fr Sat Jul 16 15:02:33 2005
Return-path: <sven.luther at wanadoo.fr>
Received: from smtp3.wanadoo.fr [193.252.22.28]
by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
id 1Dtujw-0002SW-00; Sat, 16 Jul 2005 15:02:33 -0700
Received: from me-wanadoo.net (localhost [127.0.0.1])
by mwinf0302.wanadoo.fr (SMTP Server) with ESMTP id ED0701C00B17
for <292937-done at bugs.debian.org>; Sun, 17 Jul 2005 00:02:01 +0200 (CEST)
Received: from pegasos (AStrasbourg-251-1-55-245.w82-126.abo.wanadoo.fr [82.126.139.245])
by mwinf0302.wanadoo.fr (SMTP Server) with ESMTP id D82601C00B14
for <292937-done at bugs.debian.org>; Sun, 17 Jul 2005 00:02:01 +0200 (CEST)
X-ME-UUID: 20050716220201885.D82601C00B14 at mwinf0302.wanadoo.fr
Received: from luther by pegasos with local (Exim 4.51)
id 1Dtud7-0001mc-24
for 292937-done at bugs.debian.org; Sat, 16 Jul 2005 23:55:29 +0200
Date: Sat, 16 Jul 2005 23:55:28 +0200
To: 292937-done at bugs.debian.org
Subject: The amd64 autobuilder built parted 1.6.23-1, so this is probably fixed.
Message-ID: <20050716215528.GA6850 at pegasos>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
From: Sven Luther <sven.luther at wanadoo.fr>
Delivered-To: 292937-done at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
As the subject says,
Friendly,
Sven Luther
More information about the Parted-maintainers
mailing list