FreeBSD Bugzilla – Attachment 232156 Details for
Bug 261826
emulators/joytran: Fails to build: error: variable 'delay' set but not used [-Werror,-Wunused-but-set-variable]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] turn off -Werror and fix variable set but not used warning
0001-emulators_joytran.diff (text/plain), 1.64 KB, created by
Timothy Beyer
on 2022-02-28 09:48:35 UTC
(
hide
)
Description:
[PATCH] turn off -Werror and fix variable set but not used warning
Filename:
MIME Type:
Creator:
Timothy Beyer
Created:
2022-02-28 09:48:35 UTC
Size:
1.64 KB
patch
obsolete
>From ecea6a404484d7861faed54b4d9ae50431e5d521 Mon Sep 17 00:00:00 2001 >From: Timothy Beyer <beyert_freebsd@fastmail.net> >Date: Mon, 28 Feb 2022 01:42:12 -0800 >Subject: [PATCH] turn off -Werror and fix variable set but not used warning > >--- > emulators/{joytran.orig => joytran}/Makefile | 1 + > .../joytran/files/patch-src_generate__events.c | 11 +++++++++++ > 2 files changed, 12 insertions(+) > create mode 100644 emulators/joytran/files/patch-src_generate__events.c > >diff --git a/emulators/joytran.orig/Makefile b/emulators/joytran/Makefile >index 5ee3c12..bc2b6f5 100644 >--- a/emulators/joytran.orig/Makefile >+++ b/emulators/joytran/Makefile >@@ -21,6 +21,7 @@ OPTIONS_DEFINE= DOCS > > post-patch: > @${REINPLACE_CMD} -e '/WARNING_FLAGS/s,-pedantic,& -fcommon,' \ >+ -e 's| -Werror||g' \ > ${WRKSRC}/CMakeLists.txt > > post-install: >diff --git a/emulators/joytran/files/patch-src_generate__events.c b/emulators/joytran/files/patch-src_generate__events.c >new file mode 100644 >index 0000000..da322f4 >--- /dev/null >+++ b/emulators/joytran/files/patch-src_generate__events.c >@@ -0,0 +1,11 @@ >+--- src/generate_events.c.orig 2014-05-20 06:05:31 UTC >++++ src/generate_events.c >+@@ -147,7 +147,7 @@ void generate_relative_motion_event2(int xMove, int yM >+ /* my own (first?) line algorithm, not as good as Bresenham's line algorithm, >+ though. Not very good. */ >+ void generate_relative_motion_event(int xpps, int ypps) { >+- int i = 0, x = 0, y = 0, delay = 0, xdelay, ydelay; >++ int i = 0, x = 0, y = 0, delay, xdelay, ydelay; >+ int axpps = abs(xpps), aypps = abs(ypps); >+ if (axpps < 1000) { x = make1(xpps); } >+ else { x = xpps / 1000; }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261826
:
231675
|
232156
|
233979
|
233984