src: fix compiler warning in udp_wrap.cc
Currently the following compiler warning is generated:
1 warning generated.
../src/udp_wrap.cc:238:12: warning: comparison of integers of different
signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
if (size != args[0].As<Uint32>()->Value()) {
~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
This commit changes the check to see that the Uint32 value does not exceed the max int size instead of first casting and then comparing.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
src