Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting warnings in console on fresh build #18983

Closed
prog1dev opened this issue Feb 25, 2018 · 7 comments
Closed

Getting warnings in console on fresh build #18983

prog1dev opened this issue Feb 25, 2018 · 7 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@prog1dev
Copy link
Contributor

prog1dev commented Feb 25, 2018

I get various warnings in console output if I build node from scratch with ./configure && make -j4.
I guess its nothing to worry about but it might be good first contributions?
Here there are:

../deps/icu-small/source/common/unistr.cpp:1941:13: warning: unused function 'uprv_UnicodeStringDummy' [-Wunused-function]
static void uprv_UnicodeStringDummy(void) {
../deps/openssl/openssl/ssl/d1_srtp.c:143:7: warning: missing field 'id' initializer [-Wmissing-field-initializers]
    {0}
      ^
1 warning generated.
../deps/openssl/openssl/ssl/ssl_lib.c:188:1: warning: missing field 'enc_flags' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/cmac/cm_ameth.c:96:1: warning: missing field 'item_verify' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/dh/dh_ameth.c:617:1: warning: missing field 'old_priv_decode' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/dh/dh_ameth.c:649:1: warning: missing field 'old_priv_decode' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/dsa/dsa_ameth.c:634:21: warning: missing field 'pem_str' initializer [-Wmissing-field-initializers]
     ASN1_PKEY_ALIAS},
                    ^
../deps/openssl/openssl/crypto/dsa/dsa_ameth.c:639:21: warning: missing field 'pem_str' initializer [-Wmissing-field-initializers]
     ASN1_PKEY_ALIAS},
                    ^
../deps/openssl/openssl/crypto/dsa/dsa_ameth.c:644:21: warning: missing field 'pem_str' initializer [-Wmissing-field-initializers]
     ASN1_PKEY_ALIAS},
                    ^
../deps/openssl/openssl/crypto/dsa/dsa_ameth.c:649:21: warning: missing field 'pem_str' initializer [-Wmissing-field-initializers]
     ASN1_PKEY_ALIAS},
                    ^
../deps/openssl/openssl/crypto/dsa/dsa_ameth.c:682:25: warning: missing field 'item_verify' initializer [-Wmissing-field-initializers]
     old_dsa_priv_encode}
                        ^
../deps/openssl/openssl/crypto/ec/ec_ameth.c:644:1: warning: missing field 'item_verify' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/engine/eng_openssl.c:361:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_dss.c:98:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_dss1.c:99:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_ecdsa.c:148:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_md4.c:102:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_md5.c:101:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_mdc2.c:102:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_null.c:93:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^1 warning generated.

1 warning generated.
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_ripemd.c:101:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/evp/m_sha1.c:99:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_sha1.c:146:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_sha1.c:166:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_sha1.c:209:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_sha1.c:229:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_sha.c:100:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
../deps/openssl/openssl/crypto/evp/m_wp.c:42:1: warning: missing field 'md_ctrl' initializer [-Wmissing-field-initializers]
};
^
5 warnings generated.
1 warning generated.
1 warning generated.
../deps/openssl/openssl/crypto/hmac/hm_ameth.c:167:1: warning: missing field 'item_verify' initializer [-Wmissing-field-initializers]
};
^
1 warning generated.
../deps/openssl/openssl/crypto/rsa/rsa_ameth.c:966:21: warning: missing field 'pem_str' initializer [-Wmissing-field-initializers]
     ASN1_PKEY_ALIAS}
                    ^
1 warning generated.
../deps/icu-small/source/tools/genrb/read.c:167:23: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
                if (c == U_EOF) {
                    ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:184:27: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
                    if (c == U_ERR) {
                        ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:245:23: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
                if (c == U_EOF) {
                    ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:264:23: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
                if (c == U_EOF) {
                    ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:290:27: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
                    if (c == U_ERR) {
                        ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:334:15: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
        if (c == U_EOF) {
            ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:349:15: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
        if (c == U_EOF) {
            ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:393:33: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
    } while (!isNewline(c) && c != U_EOF && *status == U_ZERO_ERROR);
                              ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:427:16: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
    } while (c != U_EOF && *status == U_ZERO_ERROR);
             ~ ^  ~~~~~
../deps/icu-small/source/tools/genrb/read.c:429:11: warning: comparison of integers of different signs: 'UChar32' (aka 'int') and 'unsigned int' [-Wsign-compare]
    if (c == U_EOF) {
        ~ ^  ~~~~~
../deps/v8/src/wasm/function-body-decoder.cc:49:23: warning: missing field 'mem_size' initializer [-Wmissing-field-initializers]
    context_cache = {0};
                      ^
../deps/v8/src/wasm/function-body-decoder.cc:752:33: warning: missing field 'mem_size' initializer [-Wmissing-field-initializers]
      result->context_cache = {0};
                                ^
../deps/v8/src/wasm/function-body-decoder.cc:780:31: warning: missing field 'mem_size' initializer [-Wmissing-field-initializers]
    result->context_cache = {0};
                              ^
  • Version: current master branch
  • Platform: macOS High Sierra 10.13.3
  • Subsystem: build
@benjamingr
Copy link
Member

Hey, thanks for opening the issue.

All these warnings are in Node.js direct dependencies (V8, icu-small, openssl) and they'd have to be fixed there and not in Node. The Node deps folder contains other projects Node depends on copied.

Maybe document it in the guide?

@prog1dev
Copy link
Contributor Author

prog1dev commented Feb 25, 2018

You mean in BUILDING.md guide?
And how do you think it should be phrased?

@benjamingr
Copy link
Member

Maybe as a note below the text "Note that the above requires that python resolve to Python 2.6 or 2.7 and not a newer version."?

@ChALkeR ChALkeR added the build Issues and PRs related to build files or the CI. label Feb 25, 2018
bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Feb 27, 2018
We already disable `-Wmissing-field-initializers` on other Unices but
not on MacOS.

Fixes: nodejs#18983 (partially)
@apapirovski
Copy link
Member

apapirovski commented Mar 4, 2018

This is only partially addressed by the commit above. Re-opening.

@apapirovski apapirovski reopened this Mar 4, 2018
addaleax pushed a commit to addaleax/node that referenced this issue Mar 5, 2018
We already disable `-Wmissing-field-initializers` on other Unices but
not on MacOS.

PR-URL: nodejs#19046
Fixes: nodejs#18983
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
MayaLekova pushed a commit to MayaLekova/node that referenced this issue May 8, 2018
We already disable `-Wmissing-field-initializers` on other Unices but
not on MacOS.

PR-URL: nodejs#19046
Fixes: nodejs#18983
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
MylesBorins pushed a commit that referenced this issue Aug 17, 2018
We already disable `-Wmissing-field-initializers` on other Unices but
not on MacOS.

PR-URL: #19046
Fixes: #18983
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
@gireeshpunathil
Copy link
Member

fwiw, here is the outstanding set of warnings when I checked the master on a linux x64:

make: Warning: File `tools/v8_gypfiles/v8_version.target.mk' has modification time 3562 s in the future
../deps/icu-small/source/i18n/collationweights.cpp: In member function ‘UBool icu_65::CollationWeights::allocWeights(uint32_t, uint32_t, int32_t)’:
../deps/icu-small/source/i18n/collationweights.cpp:394:39: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
     for(int32_t i = 0; i < rangeCount && ranges[i].length <= (minLength + 1); ++i) {
                        ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/icu-small/source/i18n/olsontz.cpp: In member function ‘virtual UBool icu_65::OlsonTimeZone::inDaylightTime(UDate, UErrorCode&) const’:
../deps/icu-small/source/i18n/olsontz.cpp:601:18: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     int32_t raw, dst;
                  ^~~
../deps/icu-small/source/common/unistr.cpp:1975:13: warning: ‘void uprv_UnicodeStringDummy()’ defined but not used [-Wunused-function]
 static void uprv_UnicodeStringDummy(void) {
             ^~~~~~~~~~~~~~~~~~~~~~~
../deps/icu-small/source/common/unistr.cpp:1975:13: warning: ‘void uprv_UnicodeStringDummy()’ defined but not used [-Wunused-function]
 static void uprv_UnicodeStringDummy(void) {
             ^~~~~~~~~~~~~~~~~~~~~~~
../deps/icu-small/source/i18n/collationweights.cpp: In member function ‘UBool icu_65::CollationWeights::allocWeights(uint32_t, uint32_t, int32_t)’:
../deps/icu-small/source/i18n/collationweights.cpp:394:39: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
     for(int32_t i = 0; i < rangeCount && ranges[i].length <= (minLength + 1); ++i) {
                        ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/icu-small/source/i18n/olsontz.cpp: In member function ‘virtual UBool icu_65::OlsonTimeZone::inDaylightTime(UDate, UErrorCode&) const’:
../deps/icu-small/source/i18n/olsontz.cpp:601:18: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     int32_t raw, dst;
                  ^~~
../deps/uvwasi/src/uvwasi.c: In function ‘uvwasi_fd_readdir’:
../deps/uvwasi/src/uvwasi.c:1204:5: warning: implicit declaration of function ‘seekdir’ [-Wimplicit-function-declaration]
     seekdir(dir->dir, cookie);
     ^~~~~~~
../deps/uvwasi/src/uvwasi.c:1223:14: warning: implicit declaration of function ‘telldir’ [-Wimplicit-function-declaration]
       tell = telldir(dir->dir);
              ^~~~~~~
../deps/uvwasi/src/uvwasi.c: In function ‘uvwasi_path_readlink’:
../deps/uvwasi/src/uvwasi.c:1840:9: warning: implicit declaration of function ‘strnlen’ [-Wimplicit-function-declaration]
   len = strnlen(req.ptr, buf_len);
         ^~~~~~~
../deps/llhttp/src/llhttp.c:56:38: warning: ‘llparse_blob10’ defined but not used [-Wunused-const-variable=]
 static const unsigned char ALIGN(16) llparse_blob10[] = {
                                      ^~~~~~~~~~~~~~
../deps/llhttp/src/llhttp.c:52:38: warning: ‘llparse_blob9’ defined but not used [-Wunused-const-variable=]
 static const unsigned char ALIGN(16) llparse_blob9[] = {
                                      ^~~~~~~~~~~~~
../deps/llhttp/src/llhttp.c:46:38: warning: ‘llparse_blob7’ defined but not used [-Wunused-const-variable=]
 static const unsigned char ALIGN(16) llparse_blob7[] = {
                                      ^~~~~~~~~~~~~
../deps/llhttp/src/llhttp.c:27:38: warning: ‘llparse_blob1’ defined but not used [-Wunused-const-variable=]
 static const unsigned char ALIGN(16) llparse_blob1[] = {
                                      ^~~~~~~~~~~~~
../deps/uv/src/unix/fs.c: In function ‘uv__fs_mkstemp’:
../deps/uv/src/unix/fs.c:289:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     *(int**)(&mkostemp_function) = dlsym(RTLD_DEFAULT, "mkostemp");
     ^
../src/node_env_var.cc: In copy constructor ‘node::MapKVStore::MapKVStore(const node::MapKVStore&)’:
../src/node_env_var.cc:50:3: warning: base class ‘class node::KVStore’ should be explicitly initialized in the copy constructor [-Wextra]
   MapKVStore(const MapKVStore& other) : map_(other.map_) {}
   ^~~~~~~~~~

@HarshithaKP
Copy link
Member

I would like to work on few of these.

Trott pushed a commit that referenced this issue Jan 2, 2020
Initialise the superclass object in the copy constructor of mapKVStore

PR-URL: #31136
Refs: #18983
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BridgeAR pushed a commit that referenced this issue Jan 3, 2020
Initialise the superclass object in the copy constructor of mapKVStore

PR-URL: #31136
Refs: #18983
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue Jan 14, 2020
Initialise the superclass object in the copy constructor of mapKVStore

PR-URL: #31136
Refs: #18983
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs pushed a commit that referenced this issue Feb 6, 2020
Initialise the superclass object in the copy constructor of mapKVStore

PR-URL: #31136
Refs: #18983
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Mesteery
Copy link
Contributor

I guess it's fixed? Feel free to (or ask to) reopen if it isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

7 participants