Hi all, Here's a simple patch to get rid of the following warning: Warning: at toplevel: assignment of value of type `(procedure print-call-chain (#!rest) (or pair null))' to toplevel variable `print-call-chain' does not match declared type `(procedure print-call-chain (#!optional (refine (output) port) fixnum * string) undefined)'
Alternatively, we could change the type to match the implementation, but then we should also document the fact that the call chain is returned. This doesn't make much sense to me. Cheers, Peter
From e779d41c785eb9f5e5966019535fb5aef77b5fbe Mon Sep 17 00:00:00 2001 From: Peter Bex <pe...@more-magic.net> Date: Sun, 13 Aug 2017 13:18:53 +0200 Subject: [PATCH] Make print-call-chain match the declared type in types.db It is declared not to return anything (void), but it takes some effort to return the call chain, resulting in a type warning. --- library.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library.scm b/library.scm index 07bebe1f..1efe5c3d 100644 --- a/library.scm +++ b/library.scm @@ -4439,9 +4439,7 @@ EOF (##sys#check-output-port port #t 'print-call-chain) (##sys#check-fixnum start 'print-call-chain) (##sys#check-string header 'print-call-chain) - (let ((ct (get-call-chain start thread))) - (##sys#really-print-call-chain port ct header) - ct)) + (##sys#really-print-call-chain port (get-call-chain start thread) header) ) ;;; Interrupt handling: -- 2.11.0
signature.asc
Description: PGP signature
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers