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 warnings in node_buffer.cc #25665

Closed
wants to merge 1 commit into from

Commits on Jan 23, 2019

  1. src: fix compiler warnings in node_buffer.cc

    Currently the following compiler warnings are generated on Linux:
    ../src/node_buffer.cc:
    In function 'void node::Buffer::{anonymous}::StringSlice(
        const v8::FunctionCallbackInfo<v8::Value>&)
          [with node::encoding encoding = (node::encoding)1]':
    ../src/node_buffer.cc:54:20: warning:
    'start' may be used uninitialized in this function
    [-Wmaybe-uninitialized]
       if (end < start) end = start;
                        ^~~
    ../src/node_buffer.cc:50:10: note: 'start' was declared here
       size_t start;
              ^~~~~
    
    This commit initializes start and end to zero to avoid these warnings.
    danbev committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    1cf0f97 View commit details
    Browse the repository at this point in the history