Bug 163440 - [patch] sysutils/uhidd: unbreak build on clang/gcc46
Summary: [patch] sysutils/uhidd: unbreak build on clang/gcc46
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-18 23:20 UTC by Jan Beich
Modified: 2012-01-14 20:00 UTC (History)
0 users

See Also:


Attachments
clang.diff (1.95 KB, patch)
2011-12-18 23:20 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2011-12-18 23:20:04 UTC

How-To-Repeat: $ __MAKE_CONF= make CC=clang
[...]
clang -O2 -pipe -fno-strict-aliasing  -I. -I/usr/ports/sysutils/uhidd/work/uhidd-0.2.0/uhidd -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c uhidd_hidump.c
uhidd_hidump.c:299:30: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
                nibble = (dval >> (i * 4)) && 0x0F;
                                           ^  ~~~~
uhidd_hidump.c:299:30: note: use '&' for a bitwise operation
                nibble = (dval >> (i * 4)) && 0x0F;
                                           ^~
                                           &
uhidd_hidump.c:299:30: note: remove constant to silence this warning
                nibble = (dval >> (i * 4)) && 0x0F;
                                           ^~~~~~~
1 error generated.
*** [uhidd_hidump.o] Error code 1
[...]
lex -t  lex.l > lex.c
clang -O2 -pipe -fno-strict-aliasing  -I. -I/usr/ports/sysutils/uhidd/work/uhidd-0.2.0/uhidd -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c lex.c
lex.l:486:12: error: function 'input' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static int input(void)
           ^
1 error generated.
*** [lex.o] Error code 1

$ __MAKE_CONF= make CC=gcc46
[...]
gcc46 -O2 -pipe -fno-strict-aliasing  -I. -I/usr/ports/sysutils/uhidd/work/uhidd-0.2.0/uhidd -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c uhidd.c
uhidd.c: In function 'open_device':
uhidd.c:316:39: error: variable 'ddesc' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

*** [uhidd.o] Error code 1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-18 23:20:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-18 23:20:16 UTC
Maintainer of sysutils/uhidd,

Please note that PR ports/163440 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/163440

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-12-18 23:20:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 kaiwang27 2011-12-19 19:21:53 UTC
Approved.

Please commit the patch.

Thanks,
Kai
Comment 5 Martin Wilke freebsd_committer freebsd_triage 2012-01-14 19:58:55 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-01-14 19:58:57 UTC
miwi        2012-01-14 19:58:48 UTC

  FreeBSD ports repository

  Added files:
    sysutils/uhidd/files patch-hidump.c patch-uhidd-lex.l 
                         patch-uhidd-uhidd.c 
  Log:
  - Unbreak build on clang/gcc46
  
  PR:             163440
  Submitted by:   Jan Beich <jbeich@tormail.net>
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.1       +11 -0     ports/sysutils/uhidd/files/patch-hidump.c (new)
  1.1       +19 -0     ports/sysutils/uhidd/files/patch-uhidd-lex.l (new)
  1.1       +19 -0     ports/sysutils/uhidd/files/patch-uhidd-uhidd.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"