Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425816 - sys-kernel/hardened-sources-3.4.2: drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
Summary: sys-kernel/hardened-sources-3.4.2: drivers/scsi/lpfc/lpfc_scsi.c:1900:11: err...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords: PATCH
: 430238 434454 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-11 13:31 UTC by Dennis Schridde
Modified: 2012-09-09 17:21 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed fix (linux-3.4-scsi-lpfc-wno_unused.patch,329 bytes, patch)
2012-07-20 21:47 UTC, Göktürk Yüksek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2012-07-11 13:31:15 UTC
# make
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  LD [M]  drivers/scsi/scsi_mod.o
  CC [M]  drivers/scsi/lpfc/lpfc_scsi.o
cc1: warnings being treated as errors
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1
make[2]: *** [drivers/scsi/lpfc] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

# grep LPFC .config                                                                                                              
CONFIG_SCSI_LPFC=m

Reproducible: Always




Portage 2.1.10.65 (hardened/linux/x86, gcc-4.5.3, glibc-2.14.1-r3, 3.1.0-3-grml-486 i686)
=================================================================
System uname: Linux-3.1.0-3-grml-486-i686-Intel-R-_Xeon-TM-_CPU_3.20GHz-with-gentoo-2.1
Timestamp of tree: Wed, 11 Jul 2012 11:15:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2, 3.2.3
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-local sunrise
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -march=native -O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -march=native -O2"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg --buildpkg --binpkg-respect-use --with-bdeps y --keep-going"
FCFLAGS="-march=i686 -O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-
head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=i686 -O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.o
rg"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j3"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="     --delete-excluded     --include='/sci-libs/'         --include='/sci-libs/gsl/'         --exclude='/sci-libs/*/'  
   --include='/x11-libs/'     --include='/x11-misc/'     --include='/x11-proto/'     --exclude='/games*/' --exclude='/gnome*/' --exclude='/gnuste
p*/' --exclude='/gpe*/' --exclude='/kde*/' --exclude='/lxde*/' --exclude='/rox*/' --exclude='/sci*/' --exclude='/x11*/' --exclude='/xfce*/'"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=
180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/gentoo"
PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/sunrise"
[...]
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Göktürk Yüksek archtester gentoo-dev 2012-07-11 14:18:51 UTC
./linux-3.4.2-hardened/drivers/scsi/lpfc/Makefile:ccflags-y += -Werror

This is causing the problem. However I can't reproduce this with gcc 4.6.2 on amd64. Adding '-Wno-unused' before '-Werror' should solve it.
Comment 2 Anthony Basile gentoo-dev 2012-07-12 01:47:24 UTC
This is not hardened specific.

@gokturk.  Do you want to make a patch.  I'll test and if it works, it should go into genpatches and better still upstream.
Comment 3 Göktürk Yüksek archtester gentoo-dev 2012-07-20 21:47:52 UTC
Created attachment 318762 [details, diff]
proposed fix

Strange, although I'm cc'd to the bug, I don't see it in my inbox. Anyway this patch is against 3.4 tarball. I appended it to ${UNIPATCH_LIST} of hardened-sources-3.4.2 ebuild and it seems to apply just fine. With 'CONFIG_SCSI_LPFC=y' it compiled successfully.
Comment 4 Anthony Basile gentoo-dev 2012-07-22 14:14:44 UTC
(In reply to comment #3)
> Created attachment 318762 [details, diff] [details, diff]
> proposed fix
> 
> Strange, although I'm cc'd to the bug, I don't see it in my inbox. Anyway
> this patch is against 3.4 tarball. I appended it to ${UNIPATCH_LIST} of
> hardened-sources-3.4.2 ebuild and it seems to apply just fine. With
> 'CONFIG_SCSI_LPFC=y' it compiled successfully.

Okay this fix was included in hardened-sources-3.4.6.  Please test and reopen if this is still an issue.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-07 02:22:46 UTC
*** Bug 430238 has been marked as a duplicate of this bug. ***
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-09 17:21:45 UTC
*** Bug 434454 has been marked as a duplicate of this bug. ***