Skip to content

Commit 4c43e67

Browse files
committed
Fix Windows compiler warnings
1 parent 759c6f1 commit 4c43e67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/njs/src/njsConnection.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ void Connection::GetInBindParamsScalar(Local<Value> v8val, Bind* bind,
10331033
bind->maxSize : *(bind->len);
10341034
if(size)
10351035
{
1036-
bind->value = (char*)malloc(size);
1036+
bind->value = (char *)malloc((size_t) size);
10371037
if(bufLen)
10381038
memcpy(bind->value, Buffer::Data(obj), bufLen);
10391039
}
@@ -2154,7 +2154,7 @@ void Connection::DoDefines ( eBaton* executeBaton, const dpi::MetaData* meta,
21542154
return;
21552155
}
21562156
defines[col].buf = (char *)malloc(defines[col].maxSize *
2157-
executeBaton->maxRows) ;
2157+
(size_t) executeBaton->maxRows) ;
21582158
if ( !defines[col].buf )
21592159
{
21602160
executeBaton->error = NJSMessages::getErrorMsg (
@@ -3602,7 +3602,7 @@ void Connection::cbDynBufferAllocate ( void *ctx, bool dmlReturning,
36023602

36033603
if ( bind->isArray )
36043604
{
3605-
size_t arrayElementSize = bind->maxSize;
3605+
size_t arrayElementSize = (size_t) bind->maxSize;
36063606

36073607
Connection::AllocateBindArray ( bind->type, bind, executeBaton,
36083608
&arrayElementSize );

0 commit comments

Comments
 (0)