Opened 14 years ago

Closed 14 years ago

#3653 closed defect (fixed)

Cast needed to pass Visual Studio compiler warnings

Reported by: johncz711 Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: 1.7.2
Severity: minor Keywords:
Cc:

Description

The VSIMemFile::SetLength function in cpl_vsi_mem.cpp produces a Visual Studio compiler warning on the memset call within this function. Casting the final argument as (size_t) will resolve the warning:

/* Clear the new allocated part of the buffer */

memset(pabyNewData + nAllocLength, 0, (size_t)(nNewAlloc - nAllocLength));

A suitably modified copy of cpl_vsi_mem.cpp is in the attached zip.

Attachments (1)

MOD_cpl_vsi_mem.zip (6.2 KB ) - added by johncz711 14 years ago.

Download all attachments as: .zip

Change History (2)

by johncz711, 14 years ago

Attachment: MOD_cpl_vsi_mem.zip added

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Already fixed in r20231

Note: See TracTickets for help on using tickets.