Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Fixes related to GCC9 #5798

Merged
merged 3 commits into from
Oct 30, 2019
Merged

Fixes related to GCC9 #5798

merged 3 commits into from
Oct 30, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented Oct 28, 2019

Please read commits descriptions.

Fixes #5637.
Fixes #5795.

As of C++11, the implicitly declared copy constructor is deprecated if a class has user-defined assignment operator. GCC 9 has added a warning for it.
If strncpy() is used the requested count of characters must be lower than the destination buffer. Otherwise in the edge case the result string will not have the null terminator. This change fixes the issue by making the "max path" constant 1 char smaller.
@codecov-io
Copy link

Codecov Report

Merging #5798 into master will decrease coverage by <.01%.
The diff coverage is 87.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5798      +/-   ##
==========================================
- Coverage   64.03%   64.03%   -0.01%     
==========================================
  Files         359      359              
  Lines       30774    30774              
  Branches     3416     3416              
==========================================
- Hits        19706    19705       -1     
  Misses       9845     9845              
- Partials     1223     1224       +1

@moneroexamples
Copy link
Contributor

Thanks. It compiles now on Arch Linux and gcc 9.2.0

@chfast chfast merged commit 9f31c8b into master Oct 30, 2019
@chfast chfast deleted the gcc9 branch October 30, 2019 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build error: implicitly-declared constexpr dev::SecureFixedHash Not compiling with gcc >= 9
4 participants