mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-28 11:57:30 +00:00
Merge pull request #170 from domenic/patch-1
Cast size_t to DWORD to avoid compiler warning.
This commit is contained in:
commit
320b0033b2
1 changed files with 1 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include "serialport.h"
|
||||
#include <list>
|
||||
#include "win/disphelper.h"
|
||||
|
|
@ -278,7 +277,7 @@ void EIO_Write(uv_work_t* req) {
|
|||
|
||||
// Start write operation - synchrounous or asynchronous
|
||||
DWORD bytesWrittenSync = 0;
|
||||
if(!WriteFile((HANDLE)data->fd, data->bufferData, data->bufferLength, &bytesWrittenSync, &ov)) {
|
||||
if(!WriteFile((HANDLE)data->fd, data->bufferData, static_cast<DWORD>(data->bufferLength), &bytesWrittenSync, &ov)) {
|
||||
DWORD lastError = GetLastError();
|
||||
if(lastError != ERROR_IO_PENDING) {
|
||||
// Write operation error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue