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

clang format files under port/ #10849

Closed
wants to merge 3 commits into from
Closed

clang format files under port/ #10849

wants to merge 3 commits into from

Conversation

siying
Copy link
Contributor

@siying siying commented Oct 24, 2022

Summary:
Run "clang-format" against files under port to make it happy.

Test Plan: Watch existing CI to pass.

Summary:
Run "clang-format" against files under port to make it happy.

Test Plan: Watch existing CI to pass.
@facebook-github-bot
Copy link
Contributor

@siying has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@anand1976
Copy link
Contributor

Should we ignore the make check-format error? I guess the newer clangformat supersedes that?

@siying
Copy link
Contributor Author

siying commented Oct 24, 2022

Should we ignore the make check-format error? I guess the newer clangformat supersedes that?

That's a good point. Let me fix the code to make "make format" happy.

@facebook-github-bot
Copy link
Contributor

@siying has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@siying has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@siying
Copy link
Contributor Author

siying commented Oct 24, 2022

The failure is odd:

In file included from /root/project/port/win/port_win.cc:12:
/root/project/port/win/port_win.h: In function 'void* rocksdb::port::cacheline_aligned_alloc(size_t)':
/root/project/port/win/port_win.h:227:10: error: '_aligned_malloc' was not declared in this scope; did you mean '_aligned_realloc'?
  227 |   return _aligned_malloc(size, CACHE_LINE_SIZE);
      |          ^~~~~~~~~~~~~~~
      |          _aligned_realloc
/root/project/port/win/port_win.h: In function 'void rocksdb::port::cacheline_aligned_free(void*)':
/root/project/port/win/port_win.h:235:3: error: '_aligned_free' was not declared in this scope; did you mean '_aligned_realloc'?
  235 |   _aligned_free(memblock);
      |   ^~~~~~~~~~~~~
      |   _aligned_realloc

Let me try to revert some header order.

@facebook-github-bot
Copy link
Contributor

@siying has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@siying has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants