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

Addressing -Werror=restrict: Harmonizing C++ std::string with C-Style Strings #144

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samuel21119
Copy link

Check List

  1. Does your submission pass tests by running make test?
  2. If you have specified a [no ci] tag, does your submission also pass tests by running make test-docker?
  3. Have you linted your code locally with make lint before submission?

Fixed

Resolved std::string operation errors caused by the warning flag "-Werror=restrict" when using G++ 12.2.
The issue arose from mixing traditional C-style string formatting with C++ std::string operations. These modifications ensure that all C-style strings are properly converted to std::string objects.

Affected Files:

  1. src/cli/cli_tab.cpp
  2. src/util/phase.cpp
  3. src/util/text_format.cpp
  4. vendor/tqdm/tqdm.hpp

…ing the code with "-Werror=restrict": __builtin_memcpy may have overlapped memory region. The performance is also optimized to avoid redundant memory copy.
…ing the code with "-Werror=restrict": __builtin_memcpy may have overlapped memory region.
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.

1 participant