Skip to content

Replace old-style casts#2

Merged
bendichter merged 3 commits into
catalystneuro:mainfrom
oruebel:fix_oldstyle_cast
Jul 16, 2026
Merged

Replace old-style casts#2
bendichter merged 3 commits into
catalystneuro:mainfrom
oruebel:fix_oldstyle_cast

Conversation

@oruebel

@oruebel oruebel commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fix #1

  • Replaced old-style casts with the specific C++ casts to avoid build warnings.
  • Enabled strict warnings on build: enable -Wall, -Wextra, -Wold-style-cast, and -Wsign-conversion; and mark CURL as SYSTEM include to suppress warnings from external includes that are outside of remfile-cpp's control

oruebel and others added 3 commits July 16, 2026 12:48
The warning flags are GNU-style, and MSVC's cl.exe rejects them with a
hard error (D8021) rather than ignoring them. Since remfile-cpp is
consumed via FetchContent, that would break any downstream Windows
build, so the flags are now set only for non-MSVC compilers. The list
is hoisted into a variable shared by the library and plugin targets.

CI additionally configures with CMAKE_COMPILE_WARNING_AS_ERROR=ON so
new warnings fail the build there, while local and downstream builds
keep warnings non-fatal to stay robust against future compiler
versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bendichter

Copy link
Copy Markdown
Collaborator

Thanks @oruebel, the cast replacements all look good and build cleanly for me locally. I pushed one commit on top: the warning flags are GNU-style, and MSVC's cl.exe rejects them with a hard error rather than ignoring them. Since remfile-cpp is consumed via FetchContent, that would break any downstream Windows build, so the flags are now guarded behind if(NOT MSVC) and shared between the library and plugin targets through a variable.

I also enabled CMAKE_COMPILE_WARNING_AS_ERROR=ON in the CI configure steps so the warnings you enabled actually gate merges going forward, while keeping warnings non-fatal in the default build so a future compiler version cannot break downstream consumers. I'll merge once CI is green.

@bendichter
bendichter merged commit 0d2597e into catalystneuro:main Jul 16, 2026
7 checks passed
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.

Replace use of old-style casts

2 participants