Bug 197284

Summary: comms/hcidump fails compilation on gcc48 due to unused-variable "error"
Product: Ports & Packages Reporter: dewayne
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: arved, marino
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch removes unused ctr_type from print_rfcomm_hdr none

Description dewayne 2015-02-03 00:38:18 UTC
Created attachment 152505 [details]
Patch removes unused ctr_type from print_rfcomm_hdr

Compiling this port on 10.1Stable using gcc48 results in this error:

/usr/local/libexec/ccache/gcc48  -O2 -pipe -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -UDEBUG -Wno-error -march=prescott -mtune=prescott  -fno-strict-aliasing -g0 -march=prescott -mtune=prescott   -std=gnu99  -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c sdp.c -o sdp.o
--- rfcomm.o ---
rfcomm.c: In function 'print_rfcomm_hdr':
rfcomm.c:52:20: error: unused variable 'ctr_type' [-Werror=unused-variable]
  uint8_t           ctr_type,pf,dlci,fcs;
                    ^
cc1: all warnings being treated as errors
*** [rfcomm.o] Error code 1

The enclosed patch rectifies the problem.
Comment 1 John Marino freebsd_committer freebsd_triage 2015-02-18 15:52:54 UTC
Can you provide a patch to remove -Werror?
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-02-20 16:26:11 UTC
A commit references this bug:

Author: arved
Date: Fri Feb 20 16:25:33 UTC 2015
New revision: 379445
URL: https://svnweb.freebsd.org/changeset/ports/379445

Log:
  Add -Wno-unused to prevent Werror from triggering with gcc48

  PR:             197284
  Submitted by:   dewayne@heuristicsystems.com.au

Changes:
  head/comms/hcidump/files/patch-parser-Makefile
Comment 3 Tilman Keskinoz freebsd_committer freebsd_triage 2015-02-20 16:27:43 UTC
a fix has been committed, thanks for reporting
Comment 4 John Marino freebsd_committer freebsd_triage 2015-02-20 16:31:59 UTC
The attached better is a better fix that adding the warning.  The patch fixes the problem!

And neither the patch nor the commit remove -Werror, which should go!
Comment 5 John Marino freebsd_committer freebsd_triage 2015-02-20 16:32:35 UTC
I meant "the attached patch is a better fix"
Comment 6 John Marino freebsd_committer freebsd_triage 2015-02-20 17:22:38 UTC
thanks. :)