summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-08-07 23:22:39 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-08-07 23:22:39 +0000
commit7b027458c9e5777ab1f75d74ac63fd97810373db (patch)
tree23bd0ffa2999149df8af2c1136807416a2909263
parentbf5ac561c9dcd5abbaaf3de5c50ba1a3caeea160 (diff)
Fix compilation when !defined(KTRACE) by hiding the then-unused 'code'
variable Pointed out by Amit Kulkarni (amitkulz at gmail.com)
-rw-r--r--sys/sys/syscall_mi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/syscall_mi.h b/sys/sys/syscall_mi.h
index 8f6071c5b2a..bb12b9b25be 100644
--- a/sys/sys/syscall_mi.h
+++ b/sys/sys/syscall_mi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall_mi.h,v 1.1 2012/08/07 05:16:53 guenther Exp $ */
+/* $OpenBSD: syscall_mi.h,v 1.2 2012/08/07 23:22:38 guenther Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -116,8 +116,10 @@ mi_syscall_return(struct proc *p, register_t code, int error,
static inline void
mi_child_return(struct proc *p)
{
+#if defined(SYSCALL_DEBUG) || defined(KTRACE)
int code = (p->p_flag & P_THREAD) ? SYS___tfork :
(p->p_p->ps_flags & PS_PPWAIT) ? SYS_vfork : SYS_fork;
+#endif
#ifdef SYSCALL_DEBUG
const register_t child_retval[2] = { 0, 1 };