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

Fix some compilation errors #1162

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix some compilation errors #1162

wants to merge 3 commits into from

Conversation

25077667
Copy link

@25077667 25077667 commented Jun 22, 2023

Here's a revised version of the pull request description:


This pull request includes the following changes:

  • Refactor: Fix returning stack address in BaseErrors (Commit: 7b28b2063f0a61da84d888292be81e655d477fa6)
    Explanation: Currently, the error messages in BaseErrors are evaluated on the stack, but they should be constructed on the heap using std::string to avoid memory issues. Even though C++17 enables Link-Time Optimization (LTO) by default, the stack-allocated objects would still be destructed at the next stack frame. This change ensures proper memory management.

  • Fix: Add missing override specifier (Commit: b7676df4520d219cbcadfa045f8f34bd2ef8658d)
    Explanation: The absence of the override specifier in certain functions can cause compilation errors when using Clang. This fix adds the missing override specifier to address the issue.

  • Fix: Eliminate all warnings in AppleClang (Commit: e51a874768f7c4060ea99126343d122a268afe3a)
    Explanation: There is an inconsistency with the uint64_t type between Linux x86_64 and Apple Silicon aarch64 platforms. This change resolves the issue by ensuring consistent usage of the uint64_t type across platforms. For more information on the different data models on various platforms, refer to the 64-bit computing data models Wikipedia page.

Please review and merge these changes as they improve the codebase's correctness, maintainability, and portability.

@25077667 25077667 force-pushed the master branch 2 times, most recently from ec1e112 to e51a874 Compare June 23, 2023 02:55
@25077667
Copy link
Author

Apologies for the formatting issue caused by the IDE.

To improve the cleanliness of the working tree, I have removed commit 8cd5ae1.

@25077667
Copy link
Author

25077667 commented Jun 23, 2023

There is another commit 7b28b20 that also has a formatting issue, but it's a bit more complex to revise. If it's not a concern for you, I suggest keeping the changes made in this commit.

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.

None yet

2 participants