Skip to content

fix: use more strict compiler flags#34

Merged
anonrig merged 1 commit into
mainfrom
yagiz/more-compiler-checks
Feb 4, 2026
Merged

fix: use more strict compiler flags#34
anonrig merged 1 commit into
mainfrom
yagiz/more-compiler-checks

Conversation

@anonrig

@anonrig anonrig commented Feb 3, 2026

Copy link
Copy Markdown
Member

Enables more strict compiler flags to avoid warnings like this:

external/+http+ncrypto/include/ncrypto/aead.h:22:54: warning: field 'info_' will be initialized after field 'aead_' [-Wreorder-ctor]
   22 |   Aead(const AeadInfo* info, const EVP_AEAD* aead) : info_(info), aead_(aead) {}
      |                                                      ^~~~~~~~~~~  ~~~~~~~~~~~
      |                                                      aead_(aead)  info_(info)
1 warning generated. 

@anonrig anonrig requested review from aduh95 and jasnell February 3, 2026 16:24
Comment thread cmake/ncrypto-flags.cmake Outdated
@anonrig anonrig force-pushed the yagiz/more-compiler-checks branch 2 times, most recently from 56cf070 to 4300192 Compare February 3, 2026 16:36
@anonrig anonrig force-pushed the yagiz/more-compiler-checks branch from 4300192 to d628ab0 Compare February 3, 2026 17:43
@anonrig

anonrig commented Feb 3, 2026

Copy link
Copy Markdown
Member Author

cc @jasnell @aduh95 can you review?

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about MSVC flags, the rest LGTM

Comment thread src/CMakeLists.txt
/wd4100 # Unreferenced formal parameter (like -Wno-unused-parameter)
/wd4267 # Conversion from 'size_t' to smaller type
/wd4244 # Conversion, possible loss of data
/wd4305 # Truncation from 'int' to 'bool'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it make sense to fix these?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll follow up.

@anonrig anonrig merged commit fc401e3 into main Feb 4, 2026
13 checks passed
@anonrig anonrig deleted the yagiz/more-compiler-checks branch February 4, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants