ws2_32: Implement a basic synchronous TransmitFile.
Erich E. Hoover
erich.e.hoover at wine-staging.com
Tue Oct 20 22:15:24 CDT 2015
On Tue, Oct 20, 2015 at 6:41 PM, Hugh McMaster
<hugh.mcmaster at outlook.com> wrote:
> Hi Erich,
> When checking another Wine component, I noticed build warnings for dlls/ws2_32/socket.c.
> The relevant commit is 4d081f36efefd3ccf702cacea4d20c5616cfbae1, which was your patch, so I thought I'd let you know.
> socket.c: In function ‘WS2_TransmitFile’:
> socket.c:2826:46: warning: ‘iosb.Information’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> wsa->write.iovec.iov_len = iosb.Information;
> socket.c:2808:25: note: ‘iosb.Information’ was declared here
> IO_STATUS_BLOCK iosb;
> Adding iosb.Information = 0 before status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send );
> fixes the warning, but I have no idea if that is correct for for ws2_32.
Yeah, I noticed that earlier this evening while rebasing my async
patch. I probably did a bad rebase at some point and ended up
dropping the initialization, you can find the updated async patch here
(where it's explicitly initialized to zero):
More information about the wine-devel