Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libterminfo Cast function pointers that take different a...



details:   https://anonhg.NetBSD.org/src/rev/c209f2c64bc4
branches:  trunk
changeset: 845472:c209f2c64bc4
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 03 18:02:05 2019 +0000

description:
Cast function pointers that take different arguments through void *

diffstat:

 lib/libterminfo/tputs.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r e1f9acb3db90 -r c209f2c64bc4 lib/libterminfo/tputs.c
--- a/lib/libterminfo/tputs.c   Thu Oct 03 17:56:17 2019 +0000
+++ b/lib/libterminfo/tputs.c   Thu Oct 03 18:02:05 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tputs.c,v 1.4 2017/05/01 19:09:22 roy Exp $ */
+/* $NetBSD: tputs.c,v 1.5 2019/10/03 18:02:05 christos Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tputs.c,v 1.4 2017/05/01 19:09:22 roy Exp $");
+__RCSID("$NetBSD: tputs.c,v 1.5 2019/10/03 18:02:05 christos Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -156,7 +156,8 @@
 
        _DIAGASSERT(term != NULL);
        _DIAGASSERT(str != NULL);
-       return ti_puts(term, str, 1, (int (*)(int, void *))putchar, NULL);
+       return ti_puts(term, str, 1,
+           (int (*)(int, void *))(void *)putchar, NULL);
 }
 
 int
@@ -166,7 +167,7 @@
        _DIAGASSERT(str != NULL);
        _DIAGASSERT(outc != NULL);
        return _ti_puts(1, ospeed, PC, str, affcnt,
-           (int (*)(int, void *))outc, NULL);
+           (int (*)(int, void *))(void *)outc, NULL);
 }
 
 int



Home | Main Index | Thread Index | Old Index