Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys [syzkaller] Cast all the printf's to (void *)
details: https://anonhg.NetBSD.org/src/rev/671a4c515a58
branches: trunk
changeset: 357111:671a4c515a58
user: utkarsh009 <utkarsh009%NetBSD.org@localhost>
date: Fri Oct 27 09:59:16 2017 +0000
description:
[syzkaller] Cast all the printf's to (void *)
> as a result of new printf(9) declaration.
diffstat:
sys/ddb/db_interface.h | 4 ++--
sys/ddb/db_panic.c | 4 ++--
sys/kern/init_main.c | 6 +++---
sys/kern/subr_autoconf.c | 8 ++++----
sys/kern/subr_disk.c | 6 +++---
sys/kern/subr_prf.c | 7 ++++---
sys/kern/vfs_subr.c | 8 ++++----
sys/kern/vfs_wapbl.c | 6 +++---
8 files changed, 25 insertions(+), 24 deletions(-)
diffs (226 lines):
diff -r 7b01593076bc -r 671a4c515a58 sys/ddb/db_interface.h
--- a/sys/ddb/db_interface.h Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/ddb/db_interface.h Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.h,v 1.33 2017/01/04 21:25:41 christos Exp $ */
+/* $NetBSD: db_interface.h,v 1.34 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -75,6 +75,6 @@
#define db_stacktrace() \
db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
- true, 65535, "", printf)
+ true, 65535, "", (void *)printf)
#endif /* _DDB_DB_INTERFACE_H_ */
diff -r 7b01593076bc -r 671a4c515a58 sys/ddb/db_panic.c
--- a/sys/ddb/db_panic.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/ddb/db_panic.c Fri Oct 27 09:59:16 2017 +0000
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_panic.c,v 1.3 2014/01/22 15:20:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_panic.c,v 1.4 2017/10/27 09:59:16 utkarsh009 Exp $");
#include <sys/types.h>
#include <sys/cpu.h>
@@ -52,7 +52,7 @@
cpu_index(curcpu()));
db_stack_trace_print(
(db_expr_t)(intptr_t)__builtin_frame_address(0),
- true, 65535, "", printf);
+ true, 65535, "", (void *)printf);
printf("cpu%u: End traceback...\n",
cpu_index(curcpu()));
intrace = 0;
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/init_main.c
--- a/sys/kern/init_main.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/init_main.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.490 2017/01/16 09:28:40 ryo Exp $ */
+/* $NetBSD: init_main.c,v 1.491 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.490 2017/01/16 09:28:40 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.491 2017/10/27 09:59:16 utkarsh009 Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -1117,7 +1117,7 @@
printf_nolog("%s\n", notice);
pr = aprint_normal;
} else {
- pr = printf;
+ pr = (void *)printf;
}
memset(pbuf, 0, sizeof(pbuf));
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/subr_autoconf.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.253 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.254 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.253 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.254 2017/10/27 09:59:16 utkarsh009 Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -258,7 +258,7 @@
const char *style, bool dopanic)
{
void (*pr)(const char *, ...) __printflike(1, 2) =
- dopanic ? panic : printf;
+ dopanic ? panic : (void *)printf;
int i, error = 0, e2 __diagused;
for (i = 0; cfdriverv[i] != NULL; i++) {
@@ -290,7 +290,7 @@
{
const struct cfattachinit *cfai = NULL;
void (*pr)(const char *, ...) __printflike(1, 2) =
- dopanic ? panic : printf;
+ dopanic ? panic : (void *)printf;
int j = 0, error = 0, e2 __diagused;
for (cfai = &cfattachv[0]; cfai->cfai_name != NULL; cfai++) {
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/subr_disk.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk.c,v 1.119 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: subr_disk.c,v 1.120 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.119 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.120 2017/10/27 09:59:16 utkarsh009 Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -138,7 +138,7 @@
log(pri, fmt);
pr = addlog;
} else
- pr = printf;
+ pr = (void *)printf;
(*pr)("%s%d%c: %s %sing fsbn ", dname, unit, partname, what,
bp->b_flags & B_READ ? "read" : "writ");
sn = bp->b_blkno;
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/subr_prf.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.160 2016/07/27 09:57:26 skrll Exp $ */
+/* $NetBSD: subr_prf.c,v 1.161 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.160 2016/07/27 09:57:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.161 2017/10/27 09:59:16 utkarsh009 Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1032,7 +1032,7 @@
/*
* printf: print a message to the console and the log
*/
-void
+int
printf(const char *fmt, ...)
{
va_list ap;
@@ -1047,6 +1047,7 @@
if (!panicstr)
logwakeup();
+ return 0;
}
/*
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/vfs_subr.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.468 2017/06/04 07:58:29 hannken Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.469 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.468 2017/06/04 07:58:29 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.469 2017/10/27 09:59:16 utkarsh009 Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1131,7 +1131,7 @@
if (label != NULL)
printf("%s: ", label);
- vprint_common(vp, "\t", printf);
+ vprint_common(vp, "\t", (void *)printf);
if (vp->v_data != NULL) {
printf("\t");
VOP_PRINT(vp);
@@ -1512,7 +1512,7 @@
uvm_object_printit(&vp->v_uobj, full, pr);
(*pr)("\n");
- vprint_common(vp, "", printf);
+ vprint_common(vp, "", (void *)printf);
if (full) {
struct buf *bp;
diff -r 7b01593076bc -r 671a4c515a58 sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c Fri Oct 27 09:59:15 2017 +0000
+++ b/sys/kern/vfs_wapbl.c Fri Oct 27 09:59:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_wapbl.c,v 1.98 2017/10/23 19:03:40 jdolecek Exp $ */
+/* $NetBSD: vfs_wapbl.c,v 1.99 2017/10/27 09:59:16 utkarsh009 Exp $ */
/*-
* Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#define WAPBL_INTERNAL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.98 2017/10/23 19:03:40 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.99 2017/10/27 09:59:16 utkarsh009 Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -2167,7 +2167,7 @@
#endif
if (!wl)
return;
- wapbl_print(wl, 1, printf);
+ wapbl_print(wl, 1, (void *)printf);
}
#endif
Home |
Main Index |
Thread Index |
Old Index