mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: suppress compiler warning in test_bigint
Currently the are two of following compiler warnings is generated: In file included from ../test_bigint.c:5: ../test_bigint.c: In function ‘CreateTooBigBigInt’: ../test_bigint.c:120:22: warning: ‘words’ may be used uninitialized [-Wmaybe-uninitialized] This commit initialized the words array to avoid these warnings. PR-URL: https://github.com/nodejs/node/pull/40253 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -113,7 +113,7 @@ static napi_value TestWords(napi_env env, napi_callback_info info) {
|
||||
static napi_value CreateTooBigBigInt(napi_env env, napi_callback_info info) {
|
||||
int sign_bit = 0;
|
||||
size_t word_count = SIZE_MAX;
|
||||
uint64_t words[10];
|
||||
uint64_t words[10] = {0};
|
||||
|
||||
napi_value output;
|
||||
|
||||
@@ -125,7 +125,7 @@ static napi_value CreateTooBigBigInt(napi_env env, napi_callback_info info) {
|
||||
|
||||
// Test that we correctly forward exceptions from the engine.
|
||||
static napi_value MakeBigIntWordsThrow(napi_env env, napi_callback_info info) {
|
||||
uint64_t words[10];
|
||||
uint64_t words[10] = {0};
|
||||
napi_value output;
|
||||
|
||||
napi_status status = napi_create_bigint_words(env,
|
||||
|
||||
Reference in New Issue
Block a user