chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #1533: Scrutinizer seems to get confused about list l


From: Chicken Trac
Subject: [Chicken-janitors] #1533: Scrutinizer seems to get confused about list length
Date: Mon, 10 Sep 2018 08:22:19 -0000

#1533: Scrutinizer seems to get confused about list length
---------------------------+---------------------------------
 Reporter:  sjamaan        |                 Owner:
     Type:  defect         |                Status:  new
 Priority:  major          |             Milestone:  5.0
Component:  scrutinizer    |               Version:  5.0.0rc2
 Keywords:  flow analysis  |  Estimated difficulty:  hard
---------------------------+---------------------------------
 Seen when compiling awful-salmonella-tar:

 {{{
 (/usr/home/chicken/src/awful-salmonella-tar/ast-cache-manager.scm:86) in
 procedure call to `scheme#car', expected argument #1 of type `pair' but
 was given an argument of type `null'
 }}}

 Here's a stripped-down example that triggers it:

 {{{
 (module ast-cache-manager ()

 (import scheme (chicken base) (chicken process-context))

 (define (usage #!optional exit-code)
   (when exit-code
     (exit exit-code)))

 (let ((args (command-line-arguments)))

   (when (or (member "-h" args)
             (member "-help" args)
             (member "--help" args))
     (usage 0))

   (when (< (length args) 3)
     (usage 1))

   (let ((cache-dir (car args))
         (awful-pid (string->number (cadr args)))
         (max-items (and (not (null? (cddr args)))
                         (string->number (caddr args)))))
     (assert awful-pid)))

 ) ;; end module
 }}}

 It seems that when you remove the `when`, the warning goes away.

--
Ticket URL: <https://bugs.call-cc.org/ticket/1533>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]