Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. PR-URL: #25665 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information