From d6482e68943d49509e9e6773d40967e5e71c1f9e51e52b4a6adaa407e96d6c3e Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 10 Jan 2017 06:20:21 +0000 Subject: [PATCH] Accepting request 449312 from home:marxin:branches:Linux-PAM Fix warning reported by GCC7. OBS-URL: https://build.opensuse.org/request/show/449312 OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam-config?expand=0&rev=83 --- gcc7-Add-break-to-a-case-label.patch | 27 +++++++++++++++++++++++++++ pam-config.changes | 6 ++++++ pam-config.spec | 8 ++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 gcc7-Add-break-to-a-case-label.patch diff --git a/gcc7-Add-break-to-a-case-label.patch b/gcc7-Add-break-to-a-case-label.patch new file mode 100644 index 0000000..c52b7c1 --- /dev/null +++ b/gcc7-Add-break-to-a-case-label.patch @@ -0,0 +1,27 @@ +From d680436cd85f1f8261bfc974970319ef0efb420a Mon Sep 17 00:00:00 2001 +From: marxin +Date: Fri, 23 Dec 2016 13:01:09 +0100 +Subject: [PATCH] Add break to a case label + +GCC 7 error: +mod_pam_nam.c:45:7: error: this statement may fall through +[-Werror=implicit-fallthrough=] +--- + src/mod_pam_nam.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mod_pam_nam.c b/src/mod_pam_nam.c +index 4206b78..797690d 100644 +--- a/src/mod_pam_nam.c ++++ b/src/mod_pam_nam.c +@@ -43,6 +43,7 @@ write_config_nam (pam_module_t * this, enum write_type op, FILE * fp) + break; + case AUTH: + fprintf (fp, "auth\trequired\tpam_nam.so\tuse_first_pass\n"); ++ break; + case PASSWORD: + fprintf (fp, "password\trequired\tpam_nam.so\ttry_first_pass\n"); + break; +-- +2.11.0 + diff --git a/pam-config.changes b/pam-config.changes index 03f7560..147ad9c 100644 --- a/pam-config.changes +++ b/pam-config.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 9 10:16:32 UTC 2017 - mliska@suse.cz + +- Add gcc7-Add-break-to-a-case-label.patch: fix new warning reported + by GCC7. + ------------------------------------------------------------------- Thu Jun 23 11:20:02 CEST 2016 - kukuk@suse.de diff --git a/pam-config.spec b/pam-config.spec index 0a57f0e..e604f86 100644 --- a/pam-config.spec +++ b/pam-config.spec @@ -1,7 +1,7 @@ # # spec file for package pam-config # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,10 +23,13 @@ Group: System/Management Version: 0.91 Release: 0 PreReq: pam >= 1.3.0 -Url: https://github.com/SUSE/pam-config +Url: https://github.com/SUSE/pam-config Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +# PATCH-FIX-UPSTREAM: Fix new warning introduced in GCC7 +Patch1: gcc7-Add-break-to-a-case-label.patch + %description pam-config is a command line utility to maintain the common PAM configuration files included by most PAM application configuration @@ -38,6 +41,7 @@ add/adjust/remove other PAM modules and their options. %prep %setup -q +%patch1 -p1 %build %configure