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
Ben Noordhuis 2014-03-14 21:59:48 +01:00 committed by Fedor Indutny
parent 91b4a561df
commit a3dca9a3a6
1 changed files with 1 additions and 1 deletions

View File

@ -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);