warning: possibly unused local top-level variable `%foo?-procedure'
Tomas Volf <[email protected]>
| Newsgroups | gmane.lisp.guile.user |
|---|---|
| Message-ID | <ZmB-GZRPhybq0gjt@ws> |
Hello,
I am getting following warning from a guild compile:
warning: possibly unused local top-level variable `%foo?-procedure'
And I am not sure how to tackle it. This is my full source code:
(define-module (x)
#:use-module (srfi srfi-9)
#:export (<foo>
foo?
make-foo))
(define-record-type <foo> (make-foo) foo?)
When I try to compile it:
$ guild compile -W 3 -o x.go x.scm
x.scm:7:0: warning: possibly unused local top-level variable `%foo?-procedure'
wrote `x.go'
I would (for obvious reasons) like to keep my compilation warning-free. I can
think of two approaches:
1. Export the %foo?-procedure
I think this would confuse downstream users, since they are not expected to
use it directly.
2. Mark the procedure as used
In C I could use `(void)proc;', is there an equivalent of that construct
in Guile?
Are there other options? How are you approaching it?
Thank you and have a nice day,
Tomas Volf
PS: I am not even sure why this warning happens, the `foo?' syntax transformer
is exported and *does* reference it (as far as I can tell from ,expand).
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmZgfhkACgkQL7/ufbZ/ walvLA//afne9QJ88VKl4Duub/Y5g5y0p5+B4XnLhEZcjGf//JghM5O4irdFN7qH HeBKwtGBzbuWkDYNT3MHbutcZBwhFeDEtSS0aEt+BAaYTj8olw62EfqRen+9oAmG IGAf90y3KNHPnKJnqoGmnmiD6qhj+9qSGLfAiyono7jCzZcqI+ZrrrstsviTtCwX Qihcw+hqhbdRwfDyjEK9yT2UEte7YxG/DboCTHUzQ2pdzfK9gMzyAbarU+uPW7kW cOZFn+MwyJwLxt8Bauzj9NrUYxEx6TWtocpDzYCurfAHUcQhJ98GLT/jO6+XPiht xKsOq72UhD84F7SY562mCX9J/xXQzIqDX73NJSoUX495nlAk54DtpyrghqQDEJvb 5UUOJsn7ffrFzuQKc6GR8eUAEp6RS1FdU1q3Clu1AVa97mVy03r3GjrGCya/DIyi FrJ+YnuyeC8J9F6dIPM7FgZG1W+yZrZN3ln24x5CFZADu3mJ8aAYBQDqhTJVv5xZ TXKQSNwBtXMfvAjqzYOt+YiOVaPlmwK6WFtS3iKXVjq5EljlL6yl94VQv1c4bA5S dH91XnOR+aHofvkj6mHH+3H7rtKQ7RRo2R2RPGDOFgIuR5qLwNTZTqrYImDgOPZM PXKZ8oNjtUqMYJ4ASoDFTOP+8DaLG2XBNsCfYWpnDnVsLftC8Wg= =wp5g -----END PGP SIGNATURE-----