Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix compiler warning in udp_wrap.cc #15402

Closed
wants to merge 1 commit into from

Commits on Sep 17, 2017

  1. 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.
    danbev committed Sep 17, 2017
    Configuration menu
    Copy the full SHA
    ff211e9 View commit details
    Browse the repository at this point in the history