Skip Menu |

This queue is for tickets about the DB_File CPAN distribution.

Report information
The Basics
Id: 101342
Status: resolved
Priority: 0/
Queue: DB_File

People
Owner: Nobody in particular
Requestors: davem [...] iabyn.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.838



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.
On Tue Jan 06 07:37:22 2015, davem@iabyn.com wrote: Show quoted text
> 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.
Coverity picked up this one, too: https://rt.cpan.org/Ticket/Display.html?id=111726
On Wed Feb 03 13:04:42 2016, JHI wrote: Show quoted text
> On Tue Jan 06 07:37:22 2015, davem@iabyn.com wrote:
> > 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.
> > Coverity picked up this one, too: > https://rt.cpan.org/Ticket/Display.html?id=111726
Ping.
On Fri May 13 20:12:02 2016, JHI wrote: Show quoted text
> On Wed Feb 03 13:04:42 2016, JHI wrote:
> > On Tue Jan 06 07:37:22 2015, davem@iabyn.com wrote:
> > > 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.
> > > > Coverity picked up this one, too: > > https://rt.cpan.org/Ticket/Display.html?id=111726
> > Ping. > >
Thanks for the reminder(s). Have it fixed now. Paul