Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86_64/include Add casts to the __lint__ version of...
details: https://anonhg.NetBSD.org/src/rev/d016c1fe6ab8
branches: trunk
changeset: 520111:d016c1fe6ab8
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Jan 03 02:05:42 2002 +0000
description:
Add casts to the __lint__ version of va_arg() to avoid dereferencing
non-pointer arguments in cases like: foo = *va_arg(ap, int *);
diffstat:
sys/arch/x86_64/include/stdarg.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 8c4542aba65a -r d016c1fe6ab8 sys/arch/x86_64/include/stdarg.h
--- a/sys/arch/x86_64/include/stdarg.h Thu Jan 03 01:58:58 2002 +0000
+++ b/sys/arch/x86_64/include/stdarg.h Thu Jan 03 02:05:42 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stdarg.h,v 1.2 2002/01/03 01:56:52 thorpej Exp $ */
+/* $NetBSD: stdarg.h,v 1.3 2002/01/03 02:05:42 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@
#ifdef __lint__
#define __builtin_next_arg(t) ((t) ? 0 : 0)
#define __builtin_stdarg_start(a, l) ((a) = ((l) ? 0 : 0))
-#define __builtin_va_arg(a, t) ((a) ? 0 : 0)
+#define __builtin_va_arg(a, t) ((a) ? (t) 0 : (t) 0)
#define __builtin_va_end(a) /* nothing */
#define __builtin_va_copy(d, s) ((d) = (s))
#endif
Home |
Main Index |
Thread Index |
Old Index