Skip to content

Commit a3dca9a

Browse files
bnoordhuisindutny
authored andcommitted
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; ^
1 parent 91b4a56 commit a3dca9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/string_bytes.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ size_t StringBytes::Write(Isolate* isolate,
296296
enum encoding encoding,
297297
int* chars_written) {
298298
HandleScope scope(isolate);
299-
const char* data;
299+
const char* data = NULL;
300300
size_t len = 0;
301301
bool is_extern = GetExternalParts(isolate, val, &data, &len);
302302

0 commit comments

Comments
 (0)