Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DB_File CPAN distribution.

Report information
The Basics
Id:
111725
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
JHI [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
1.838



Subject: Coverity finding: status variable ignored multiple times
In DB_File.xs the return values of different calls are saved in a variable called status, but this variable is then overwritten several times, discarding the previous value. In other words, the return status of the calls is ignored. It probably should be either acted on, or if really to be ignored, no point in storing it (cast to void)? Four spots, line numbers from bleadperl: ... 1439 if (fixed) { CID 135030: Unused value (UNUSED_VALUE) 1440 status = dbp->set_re_pad(dbp, value) ; 1441 } 1442 else { CID 135029 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from (*dbp->set_re_delim)(dbp, value) to status here, but that stored value is overwritten before it can be used. 1443 status = dbp->set_re_delim(dbp, value) ; ... 1448 if (fixed) { 1449 svp = hv_fetch(action, "reclen", 6, FALSE); 1450 if (svp) { 1451 u_int32_t len = my_SvUV32(*svp) ; CID 135031 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from (*dbp->set_re_len)(dbp, len) to status here, but that stored value is overwritten before it can be used. 1452 status = dbp->set_re_len(dbp, len) ; 1453 } ... 1456 if (name != NULL) { CID 135028 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from (*dbp->set_re_source)(dbp, name) to status here, but that stored value is overwritten before it can be used. 1457 status = dbp->set_re_source(dbp, name) ; 1458 name = NULL ; 1459 } The final setting/overwrite happens then here: ... 1469 value_overwrite: Overwriting previous write to status with value from (*dbp->set_flags)(dbp, 128U). 1470 status = dbp->set_flags(dbp, (u_int32_t)DB_RENUMBER) ; But it looks like that status value is also then used for nothing.
Ping.
On Sat Feb 13 22:05:26 2016, JHI wrote:
Show quoted text
> Ping.
Thanks for the gentle reminder. Applied. Paul


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.