Skip to content

fix percpu ODR linker warning#255

Closed
lano1106 wants to merge 1 commit into
google:masterfrom
lano1106:percpu_odr
Closed

fix percpu ODR linker warning#255
lano1106 wants to merge 1 commit into
google:masterfrom
lano1106:percpu_odr

Conversation

@lano1106

Copy link
Copy Markdown

The following warning was received:
INFO: From Linking tcmalloc/libtcmalloc.so:
tcmalloc/internal/percpu.cc:65:30: warning: 'tcmalloc_sampler' violates the C++ One Definition Rule [-Wodr] ./tcmalloc/sampler.h:89:7: note: type name 'tcmalloc::tcmalloc_internal::Sampler' should match type name 'char' ./tcmalloc/allocation_sampling.h:57:58: note: 'tcmalloc_sampler' was previously declared here

the commit change is correcting the ODR problem.

The following warning was received:
INFO: From Linking tcmalloc/libtcmalloc.so:
tcmalloc/internal/percpu.cc:65:30: warning: 'tcmalloc_sampler' violates the C++ One Definition Rule [-Wodr]
./tcmalloc/sampler.h:89:7: note: type name 'tcmalloc::tcmalloc_internal::Sampler' should match type name 'char'
./tcmalloc/allocation_sampling.h:57:58: note: 'tcmalloc_sampler' was previously declared here

the commit change is correcting the ODR problem.

Signed-off-by: Olivier Langlois <olivier@olivierlanglois.net>
@google-cla

google-cla Bot commented Aug 16, 2024

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

1 participant