Subject: | R_SETCURSOR compiler warning |
Date: | Tue, 6 Jan 2015 12:36:58 +0000 |
To: | bug-DB_File [...] rt.cpan.org |
From: | Dave Mitchell <davem [...] iabyn.com> |
Building DB_File on bleadperl, I see this:
DB_File.xs: In function ‘db_put’:
DB_File.xs:317:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
# define flagSet(flags, bitmask) (((flags) & DB_OPFLAGS_MASK) == (bitmask))
^
DB_File.xs:540:9: note: in expansion of macro ‘flagSet’
if (flagSet(flags, R_SETCURSOR)) {
It comes from this line:
if (flagSet(flags, R_SETCURSOR)) {
which expands to:
if ((((flags) & 0x000000ff) == ((-100)))) {
I have no idea why R_SETCURSOR is negative, whether that is wrong, or how
this should be fixed.
--
I thought I was wrong once, but I was mistaken.