| Summary: | emulators/joytran: Fails to build: error: variable 'delay' set but not used [-Werror,-Wunused-but-set-variable] | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Timothy Beyer <beyert> | ||||||||||
| Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> | ||||||||||
| Status: | Closed FIXED | ||||||||||||
| Severity: | Affects Some People | CC: | beyert, mikael | ||||||||||
| Priority: | --- | Keywords: | needs-patch, needs-qa | ||||||||||
| Version: | Latest | Flags: | beyert:
maintainer-feedback+
koobs: merge-quarterly? |
||||||||||
| Hardware: | Any | ||||||||||||
| OS: | Any | ||||||||||||
| Attachments: |
|
||||||||||||
Thank you for the report and patch Timothy. As a rule of thumb and defacto recommendation, ports should not build with -Werror. Can you provide a patch that either disables this via build configuration or overrides it with -Wno-error. If you can submit warning fixes upstream too, that would be great Thanks! (In reply to Kubilay Kocak from comment #1) Thanks, I've been meaning to do a new release of joytran for a while, I just haven't gotten around to do doing so. For now, I can make a new patch that also disables -Werror. I was much less experienced at writing build systems when I first wrote joytran, but it seems that -Werror was a bad idea. Created attachment 232156 [details]
[PATCH] turn off -Werror and fix variable set but not used warning
Updated patch to also turn off -Werror
Maintainer reset. Created attachment 233979 [details]
emulators_joytran working in poudriere
Confirmed building in poudriere on multiple versions of FreeBSD, almost identical to last version except bump PORTREVISION and this patch was tested more recently.
I am the maintainer of both the project itself and the port, can someone commit this patch?
Created attachment 233984 [details]
emulators_joytran working in poudriere
fix subject in patch, but otherwise identical
|
Created attachment 231675 [details] fix variable set but not used warning / error Fixes build error for emulators/joytran on modern compilers by not initializing variable delay to 0 when the initialized value will never be used. The error is as follows: * error: variable 'delay' set but not used [-Werror,-Wunused-but-set-variable]