Subject: bin/8058: [PATCH] Atc unused parameters
To: None <gnats-bugs@gnats.netbsd.org>
From: Joseph Myers <jsm28@cam.ac.uk>
List: netbsd-bugs
Date: 07/24/1999 03:52:51
>Number: 8058
>Category: bin
>Synopsis: [PATCH] Atc unused parameters
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jul 24 03:50:03 1999
>Last-Modified:
>Originator: Joseph S. Myers
>Organization:
Trinity College, University of Cambridge, UK
>Release: NetBSD-current of 1999-07-22
>Environment:
[
System: Linux decomino 2.2.10 #1 Mon Jun 14 07:48:53 UTC 1999 i686 unknown
Architecture: i686
]
>Description:
This patch marks unused parameters in atc(6) as such.
>How-To-Repeat:
>Fix:
diff -ruN atc/grammar.y atc+/grammar.y
--- atc/grammar.y Thu Jul 22 11:16:04 1999
+++ atc+/grammar.y Sat Jul 24 09:34:02 1999
@@ -379,7 +379,7 @@
void
check_adir(x, y, dir)
- int x, y, dir;
+ int x __attribute__((__unused__)), y __attribute__((__unused__)), dir __attribute__((__unused__));
{
}
diff -ruN atc/graphics.c atc+/graphics.c
--- atc/graphics.c Wed Nov 11 12:11:25 1998
+++ atc+/graphics.c Sat Jul 24 09:34:21 1999
@@ -297,7 +297,7 @@
void
quit(dummy)
- int dummy;
+ int dummy __attribute__((__unused__));
{
int c, y, x;
#ifdef BSD
diff -ruN atc/input.c atc+/input.c
--- atc/input.c Sun Jul 18 11:11:09 1999
+++ atc+/input.c Sat Jul 24 09:36:09 1999
@@ -374,7 +374,7 @@
const char *
turn(c)
- char c;
+ char c __attribute__((__unused__));
{
if (p.altitude == 0)
return ("Planes at airports may not change direction");
@@ -383,7 +383,7 @@
const char *
circle(c)
- char c;
+ char c __attribute__((__unused__));
{
if (p.altitude == 0)
return ("Planes cannot circle on the ground");
@@ -393,7 +393,7 @@
const char *
left(c)
- char c;
+ char c __attribute__((__unused__));
{
dir = D_LEFT;
p.new_dir = p.dir - 1;
@@ -404,7 +404,7 @@
const char *
right(c)
- char c;
+ char c __attribute__((__unused__));
{
dir = D_RIGHT;
p.new_dir = p.dir + 1;
@@ -415,7 +415,7 @@
const char *
Left(c)
- char c;
+ char c __attribute__((__unused__));
{
p.new_dir = p.dir - 2;
if (p.new_dir < 0)
@@ -425,7 +425,7 @@
const char *
Right(c)
- char c;
+ char c __attribute__((__unused__));
{
p.new_dir = p.dir + 2;
if (p.new_dir >= MAXDIR)
@@ -481,7 +481,7 @@
const char *
beacon(c)
- char c;
+ char c __attribute__((__unused__));
{
dest_type = T_BEACON;
return (NULL);
@@ -489,7 +489,7 @@
const char *
ex_it(c)
- char c;
+ char c __attribute__((__unused__));
{
dest_type = T_EXIT;
return (NULL);
@@ -497,7 +497,7 @@
const char *
airport(c)
- char c;
+ char c __attribute__((__unused__));
{
dest_type = T_AIRPORT;
return (NULL);
@@ -505,7 +505,7 @@
const char *
climb(c)
- char c;
+ char c __attribute__((__unused__));
{
dir = D_UP;
return (NULL);
@@ -513,7 +513,7 @@
const char *
descend(c)
- char c;
+ char c __attribute__((__unused__));
{
dir = D_DOWN;
return (NULL);
@@ -621,7 +621,7 @@
const char *
mark(c)
- char c;
+ char c __attribute__((__unused__));
{
if (p.altitude == 0)
return ("Cannot mark planes on the ground");
@@ -633,7 +633,7 @@
const char *
unmark(c)
- char c;
+ char c __attribute__((__unused__));
{
if (p.altitude == 0)
return ("Cannot unmark planes on the ground");
@@ -645,7 +645,7 @@
const char *
ignore(c)
- char c;
+ char c __attribute__((__unused__));
{
if (p.altitude == 0)
return ("Cannot ignore planes on the ground");
diff -ruN atc/log.c atc+/log.c
--- atc/log.c Sun Jul 18 11:11:09 1999
+++ atc+/log.c Sat Jul 24 09:36:25 1999
@@ -292,7 +292,7 @@
void
log_score_quit(dummy)
- int dummy;
+ int dummy __attribute__((__unused__));
{
(void)log_score(0);
exit(0);
diff -ruN atc/update.c atc+/update.c
--- atc/update.c Wed Nov 11 12:11:26 1998
+++ atc+/update.c Sat Jul 24 09:37:07 1999
@@ -58,7 +58,7 @@
void
update(dummy)
- int dummy;
+ int dummy __attribute__((__unused__));
{
int i, dir_diff, unclean;
PLANE *pp, *p1, *p2;
>Audit-Trail:
>Unformatted: