Here are two patches. First avoids three new warnings from cutting-edge gcc with all warning/error options enabled.
The second fixes a long-standing "make distcheck" failure, probably noticed by no one other than me. >From 8762318d7415398e95dbf2546a7c6993bd4b5392 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Mon, 9 Jan 2012 14:45:34 +0100 Subject: [PATCH 1/2] build: appease gcc's -Werror=suggest-attribute=pure * parted/strlist.c (wchar_strcasecmp): Add pure attribute; make static. (wchar_strncasecmp): Likewise. (wchar_strdup): Likewise. --- parted/strlist.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parted/strlist.c b/parted/strlist.c index abf5855..d34fb56 100644 --- a/parted/strlist.c +++ b/parted/strlist.c @@ -63,7 +63,7 @@ wchar_strchr (const wchar_t* str, char ch) #endif } -int +static int _GL_ATTRIBUTE_PURE wchar_strcasecmp (const wchar_t* a, const wchar_t* b) { #ifdef ENABLE_NLS @@ -73,7 +73,7 @@ wchar_strcasecmp (const wchar_t* a, const wchar_t* b) #endif } -int +static int _GL_ATTRIBUTE_PURE wchar_strncasecmp (const wchar_t* a, const wchar_t* b, size_t n) { #ifdef ENABLE_NLS @@ -83,7 +83,7 @@ wchar_strncasecmp (const wchar_t* a, const wchar_t* b, size_t n) #endif } -wchar_t* +static wchar_t * _GL_ATTRIBUTE_PURE wchar_strdup (const wchar_t* str) { #ifdef ENABLE_NLS -- 1.7.9.rc0.2.g4b783 >From 74a139ab42bb40f00d5196789d1646494f154967 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Mon, 9 Jan 2012 15:04:40 +0100 Subject: [PATCH 2/2] build: fix "make distcheck" failure Ever since "make distcheck" began using sudo (i.e., running "make check" as root, and then running it as non-root), the build-after-root would often fail due to some derived files being owned by root. This change adds a "chown -R $USER ." to restore order. * Makefile.am (root-check): Run "chown -R $USER ." after sudo run. (root_check): Rename variable from root-check, to avoid a warning from automake about non-POSIX variable. --- Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 39c1d01..ae252bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,13 +30,13 @@ MAINTAINERCLEANFILES = parted.spec .PHONY: root-check root-check: - sudo $(MAKE) check + sudo sh -c '$(MAKE) check; t=$$?; chown -R $(USER) .; exit $$t' # Not everyone who runs "make distcheck" will want to or even # be able to run the root tests. If you want to skip them, # run make like this: "make distcheck root-check=" -root-check ?= root-check -distcheck-hook: $(root-check) +root_check ?= root-check +distcheck-hook: $(root_check) $(MAKE) my-distcheck ### ABI Checking scripts ### -- 1.7.9.rc0.2.g4b783
