mirror of https://github.com/nodejs/node.git
src: squelch -Wmaybe-uninitialized warning
The variable isn't actually used uninitialized but g++ 4.8 doesn't know that. Set it to NULL to silence the following compiler warning: ../src/string_bytes.cc:247:29: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] unsigned a = hex2bin(src[i * 2 + 0]); ^ ../src/string_bytes.cc:299:15: note: 'data' was declared here const char* data; ^pull/5010/head
parent
91b4a561df
commit
a3dca9a3a6
|
@ -296,7 +296,7 @@ size_t StringBytes::Write(Isolate* isolate,
|
|||
enum encoding encoding,
|
||||
int* chars_written) {
|
||||
HandleScope scope(isolate);
|
||||
const char* data;
|
||||
const char* data = NULL;
|
||||
size_t len = 0;
|
||||
bool is_extern = GetExternalParts(isolate, val, &data, &len);
|
||||
|
||||
|
|
Loading…
Reference in New Issue