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 init.c #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix init.c
```
init_win.c: In function 'cpuinfo_x86_windows_init':
init_win.c:130:46: warning: implicit declaration of function 'max' [-Wimplicit-function-declaration]
  130 |         const uint32_t package_bits_offset = max(
      |                                              ^~~
```
  • Loading branch information
Jamaika1 authored Aug 17, 2023
commit 512e2f5a9fcc8b86b922da7b8a371492c1d1d231
4 changes: 4 additions & 0 deletions src/x86/windows/init.c
Original file line number Diff line number Diff line change
@@ -17,6 +17,10 @@
#endif


static inline uint32_t max(uint32_t a, uint32_t b) {
return a > b ? a : b;
}

static inline uint32_t bit_mask(uint32_t bits) {
return (UINT32_C(1) << bits) - UINT32_C(1);
}