Skip to content

Conversation

@vklachkov
Copy link
Contributor

@vklachkov vklachkov commented Nov 24, 2025

One more step to make this library safe to use in a future FUSE driver.

Too much stuff happened during the refactoring process. If necessary, I'll split this PR into three separate ones.

Done:

  • use errno codes instead of -1
  • fix compilation on old compiler, use C99 standard
  • fix all known memory leaks
  • fix UB in ccos_create_dir
  • fix clang format

In progress:

  • thinking about replacing the errno codes with own error codes (this will allow remove all error printf's)
  • one more valgrind run, one more sanitizers check and maybe check project with sonarqube
  • doxygen

@BOOtak
Copy link
Owner

BOOtak commented Nov 24, 2025

It would be better to split this PR into separate ones:

  • first with clang-format fixes and re-formatting all the code with fixed clang-format. If the code is already formatted correctly, you can submit clang-format changes with another PR
  • second PR: API changes. Those should include return codes (-errno vs -1, function name and signature changes, etc.)
  • third PR: code hardening. Those changes should include CMake option to make sanitized build (ASan, UBSan), strict compilation flags (-Werror -Wall -Wextra -penantic?) - you can apply as many or as little extra warnings as you wish, because right now there are none, so any change in this direction is welcome :)

@vklachkov
Copy link
Contributor Author

Yes, I agree, there are too many changes, they need to be split.

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.

2 participants