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

map_test: Replace PAGE_SIZE with local variable name #1

Merged
merged 1 commit into from Dec 11, 2019
Merged

map_test: Replace PAGE_SIZE with local variable name #1

merged 1 commit into from Dec 11, 2019

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Oct 6, 2019

PAGE_SIZE is already a define in libc implementations global namespace
e.g. in musl. Therefore its best to use a unique variable name to not
stamp on the global definition.

Fixes
src/map_test.cpp:59:23: error: expected unqualified-id
unsigned long PAGE_SIZE = sysconf(_SC_PAGESIZE);
^
/usr/include/limits.h:89:19: note: expanded from macro 'PAGE_SIZE'
^
/usr/include/bits/limits.h:3:18: note: expanded from macro 'PAGESIZE'
^

Signed-off-by: Khem Raj raj.khem@gmail.com

PAGE_SIZE is already a define in libc implementations global namespace
e.g. in musl. Therefore its best to use a unique variable name to not
stamp on the global definition.

Fixes
src/map_test.cpp:59:23: error: expected unqualified-id
unsigned long PAGE_SIZE = sysconf(_SC_PAGESIZE);
^
/usr/include/limits.h:89:19: note: expanded from macro 'PAGE_SIZE'
^
/usr/include/bits/limits.h:3:18: note: expanded from macro 'PAGESIZE'
^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
@glneo glneo merged commit 9f91621 into glneo:master Dec 11, 2019
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.

None yet

2 participants