Fix build warnings

Also commit source file.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
This commit is contained in:
Vasant Hegde 2015-11-16 19:04:19 +05:30
parent a0c73dbe8e
commit 54545999fd
6 changed files with 100 additions and 47 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ powerpc-utils-1.2.2.tar.gz
/powerpc-utils-1.2.22.tar.gz
/powerpc-utils-1.2.23.tar.gz
/powerpc-utils-1.2.24.tar.gz
/powerpc-utils-1.2.27.tar.gz

View File

@ -1,44 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 01b258e..351f5e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,16 @@ man_MANS = \
man/sys_ident.8 \
man/lparcfg.5 \
man/lparstat.8 \
- man/lsslot.8
+ man/lsslot.8 \
+ man/lsdevinfo.8 \
+ man/rtas_event_decode.8 \
+ man/ls-vdev.8 \
+ man/lsprop.8 \
+ man/drmgr.8 \
+ man/ls-veth.8 \
+ man/ppc64_cpu.8 \
+ man/nvsetenv.8 \
+ man/ls-vscsi.8
EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS)
diff --git a/Makefile.in b/Makefile.in
index b3f5360..8679e01 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -345,7 +345,16 @@ man_MANS = \
man/sys_ident.8 \
man/lparcfg.5 \
man/lparstat.8 \
- man/lsslot.8
+ man/lsslot.8 \
+ man/lsdevinfo.8 \
+ man/rtas_event_decode.8 \
+ man/ls-vdev.8 \
+ man/lsprop.8 \
+ man/drmgr.8 \
+ man/ls-veth.8 \
+ man/ppc64_cpu.8 \
+ man/nvsetenv.8 \
+ man/ls-vscsi.8
pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h
librtas_error_SOURCES = src/common/librtas_error.c src/common/librtas_error.h

View File

@ -0,0 +1,56 @@
From ae66fdee8e73ba460b2fbc592f1bc79574c5e02d Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Mon, 16 Nov 2015 18:29:17 +0530
Subject: [PATCH] Makefile fix
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
Makefile.am | 10 +++++++++-
Makefile.in | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e6be23e..b521794 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,15 @@ man_MANS = \
man/lsslot.8 \
man/ppc64_cpu.8 \
man/errinjct.8 \
- man/rtas_dbg.8
+ man/rtas_dbg.8 \
+ man/lsdevinfo.8 \
+ man/rtas_event_decode.8 \
+ man/ls-vdev.8 \
+ man/lsprop.8 \
+ man/drmgr.8 \
+ man/ls-veth.8 \
+ man/nvsetenv.8 \
+ man/ls-vscsi.8
EXTRA_DIST += $(bin_SCRIPTS) $(sbin_SCRIPTS) $(man_MANS)
diff --git a/Makefile.in b/Makefile.in
index 3d8c1fc..efa7c7d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -505,7 +505,15 @@ man_MANS = \
man/lsslot.8 \
man/ppc64_cpu.8 \
man/errinjct.8 \
- man/rtas_dbg.8
+ man/rtas_dbg.8 \
+ man/lsdevinfo.8 \
+ man/rtas_event_decode.8 \
+ man/ls-vdev.8 \
+ man/lsprop.8 \
+ man/drmgr.8 \
+ man/ls-veth.8 \
+ man/nvsetenv.8 \
+ man/ls-vscsi.8
pseries_platform_SOURCES = src/common/pseries_platform.c src/common/pseries_platform.h
librtas_error_SOURCES = src/common/librtas_error.c src/common/librtas_error.h
--
2.1.0

View File

@ -0,0 +1,34 @@
From 484a8539fa4b4b677a0e496f8e41ba5f8da40b02 Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Mon, 16 Nov 2015 18:51:24 +0530
Subject: [PATCH] errinjct: Add format specificer
We hit below build warning with "-Werror=format-security" compilation option.
CC src/errinjct/icache.o
src/errinjct/errinjct.c: In function 'perr':
src/errinjct/errinjct.c:240:18: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, buf);
^
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
src/errinjct/errinjct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/errinjct/errinjct.c b/src/errinjct/errinjct.c
index 509f8e8..7133cca 100644
--- a/src/errinjct/errinjct.c
+++ b/src/errinjct/errinjct.c
@@ -237,7 +237,7 @@ void perr(int error, const char *fmt, ...)
buf[len] = '\0';
- fprintf(stderr, buf);
+ fprintf(stderr, "%s\n", buf);
fflush(stderr);
}
--
2.1.0

View File

@ -1,6 +1,6 @@
Name: powerpc-utils
Version: 1.2.27
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Utilities for PowerPC platforms
Group: System Environment/Base
@ -20,7 +20,8 @@ ExclusiveArch: ppc ppc64 ppc64le
# This hack is needed only for platforms with autoconf < 2.63
Patch0: powerpc-utils-autoconf.patch
Patch1: powerpc-utils-1.2.15-man.patch
Patch2: powerpc-utils-1.2.22-makefile.patch
Patch2: powerpc-utils-1.2.27-makefile.patch
Patch3: powerpc-utils-errinjct-Add-format-specificer.patch
# This is done before release of F12
Obsoletes: powerpc-utils-papr < 1.1.6-3
@ -41,6 +42,8 @@ Utilities for PowerPC platforms.
%patch1 -p1 -b .man
%patch2 -p1 -b .makefile
%patch3 -p1 -b .errinjct-Add-format-specificer
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure
@ -129,6 +132,9 @@ ln -s nvram.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/nvsetenv.8.gz
%doc README COPYRIGHT Changelog
%changelog
* Mon Nov 16 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 1.2.27-2
- Fix build warnings
* Mon Nov 16 2015 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 1.2.27
- Update to latest upstream 1.2.27

View File

@ -1 +1 @@
f492a72f2d4522eba5d9b329c84b3ed3 powerpc-utils-1.2.24.tar.gz
544511021c88fa973887a0235392d7b1 powerpc-utils-1.2.27.tar.gz