Subject: | compiler warning: croak("...%.*s...", long, string) |
Date: | Thu, 11 Dec 2014 12:07:06 -0500 |
To: | bug-HTML-Parser [...] rt.cpan.org |
From: | Justin Vallon <justinvallon [...] gmail.com> |
Mac OS X 10.9 (Mavericks) warns:
/usr/bin/clang -c -pipe -Os -fno-common -DPERL_DARWIN
-I/opt/local/include -fno-strict-aliasing -fstack-protector
-I/opt/local/include -O3 -DVERSION=\"3.71\" -DXS_VERSION=\"3.71\"
"-I/opt/local/lib/perl5/5.16.3/darwin-thread-multi-2level/CORE"
-DMARKED_SECTION Parser.c
In file included from Parser.xs:118:
./hparser.c:738:36: warning: field precision should have type 'int', but
argument has type 'long'
[-Wformat]
croak("Unrecognized identifier %.*s in argspec", s -
name, name);
~~^~ ~~~~~~~~
1 warning generated.
(that's underscoring the "%.*s" and "s - name". Assuming that name is
([const] char *), then s-name is (char*)-(char*), which is defined to be
type size_t which is not (always) size-of int. Change to "(int) s - name".
--
-Justin
JustinVallon@gmail.com
Message body not shown because it is not plain text.