Bug 209714 - security/tpm-tools: does not build on modern gcc with -Werror set
Summary: security/tpm-tools: does not build on modern gcc with -Werror set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-23 14:59 UTC by John Marino
Modified: 2016-05-23 17:32 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (hrs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer freebsd_triage 2016-05-23 14:59:58 UTC
Please either remove the -Werror flag (which is supposed to be disabled for ports anyway) or fix the following "error" that arrived with the recent update of tpm:

Thanks!

tpm_nvrelease.o -MD -MP -MF .deps/tpm_nvrelease.Tpo -c -o tpm_nvrelease.o tpm_nvrelease.c
tpm_nvcommon.c: In function 'parseStringWithValues':
tpm_nvcommon.c:143:32: error: comparison of constant '124' with boolean expression is always false [-Werror=bool-compare]
     if (!aArg[offset+numbytes] == '|' &&
                                ^
tpm_nvcommon.c:143:32: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
tpm_nvcommon.c:167:31: error: comparison of constant '124' with boolean expression is always false [-Werror=bool-compare]
    if (!aArg[offset+numbytes] == '|' &&
                               ^
tpm_nvcommon.c:167:31: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
mv -f .deps/tpm_nvdefine.Tpo .deps/tpm_nvdefine.Po
cc -DHAVE_CONFIG_H -I. -I../..  -I../../include -D_LINUX -DTSS_LIB_IS_12 -DLIBICONV_PLUG -I/usr/local/include  -pipe -Wno-unused-but-set-variable -DLIBICONV_PLUG -O2 -fno-strict-aliasing -m64 -Wall -Werror -Wreturn-type -Wsign-compare -MT tpm_nvwrite.o -MD -MP -MF .deps/tpm_nvwrite.Tpo -c -o tpm_nvwrite.o tpm_nvwrite.c
cc1: all warnings being treated as errors
mv -f .deps/tpm_nvinfo.Tpo .deps/tpm_nvinfo.Po
Makefile:604: recipe for target 'tpm_nvcommon.o' failed
gmake[5]: *** [tpm_nvcommon.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-05-23 17:28:28 UTC
A commit references this bug:

Author: hrs
Date: Mon May 23 17:27:41 UTC 2016
New revision: 415731
URL: https://svnweb.freebsd.org/changeset/ports/415731

Log:
  Fix a build error when using gcc5.

  PR:	209714

Changes:
  head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvcommon.c
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2016-05-23 17:31:08 UTC
Thanks for your report.  A fix has been committed.
Comment 3 John Marino freebsd_committer freebsd_triage 2016-05-23 17:32:06 UTC
I appreciate it, thanks!