Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/gspa/gspa Use __dead and __printflike
details: https://anonhg.NetBSD.org/src/rev/089fa3516198
branches: trunk
changeset: 769044:089fa3516198
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Aug 30 18:53:41 2011 +0000
description:
Use __dead and __printflike
diffstat:
usr.sbin/gspa/gspa/gsp_ass.h | 10 ++++------
usr.sbin/gspa/gspa/gspa.c | 10 +++++-----
2 files changed, 9 insertions(+), 11 deletions(-)
diffs (69 lines):
diff -r 995cb131393b -r 089fa3516198 usr.sbin/gspa/gspa/gsp_ass.h
--- a/usr.sbin/gspa/gspa/gsp_ass.h Tue Aug 30 18:50:48 2011 +0000
+++ b/usr.sbin/gspa/gspa/gsp_ass.h Tue Aug 30 18:53:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gsp_ass.h,v 1.12 2009/04/15 08:26:34 lukem Exp $ */
+/* $NetBSD: gsp_ass.h,v 1.13 2011/08/30 18:53:41 joerg Exp $ */
/*
* GSP assembler - definitions
*
@@ -144,10 +144,8 @@
void listing(void);
symbol lookup(char *id, bool makeit);
expr num_expr(int);
-void p1err(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
-void perr(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+void p1err(const char *fmt, ...) __printflike(1, 2);
+void perr(const char *fmt, ...) __printflike(1, 2);
void pseudo(int code, operand operands);
void push_input(char *fn);
void putcode(u_int16_t *, int);
@@ -162,7 +160,7 @@
void statement(char *opcode, operand operands);
operand string_op(char *);
void ucasify(char *);
-void yyerror(const char *err);
+__dead void yyerror(const char *err);
int yylex(void);
diff -r 995cb131393b -r 089fa3516198 usr.sbin/gspa/gspa/gspa.c
--- a/usr.sbin/gspa/gspa/gspa.c Tue Aug 30 18:50:48 2011 +0000
+++ b/usr.sbin/gspa/gspa/gspa.c Tue Aug 30 18:53:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gspa.c,v 1.14 2009/04/15 08:26:35 lukem Exp $ */
+/* $NetBSD: gspa.c,v 1.15 2011/08/30 18:53:41 joerg Exp $ */
/*
* GSP assembler main program
*
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: gspa.c,v 1.14 2009/04/15 08:26:35 lukem Exp $");
+__RCSID("$NetBSD: gspa.c,v 1.15 2011/08/30 18:53:41 joerg Exp $");
#endif
#include <sys/param.h>
@@ -83,7 +83,7 @@
jmp_buf synerrjmp;
void setext(char *, const char *, const char *);
-void usage(void);
+__dead static void usage(void);
int yyparse(void);
void c_dumpbuf(void);
@@ -287,8 +287,8 @@
longjmp(synerrjmp, 1);
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr,
"Usage: gspa [-c c_array_name] [-l list_file] [-o hex_file] [infile]\n");
Home |
Main Index |
Thread Index |
Old Index