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

Minor: fix assert in alloc_from_class #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liangcheng-yu
Copy link

Hi Anuj! This is Liangcheng.
Happened to notice a minor typo in https://github.com/erpc-io/eRPC/blob/master/src/util/huge_alloc.h#L206 which reads assert(buffer.class_size_ = class_max_size(size_class));.
It gives me compiler error when running cmake . -DPERF=OFF -DTRANSPORT=dpdk; make -j16

/home/liangcheng/eRPC/src/util/huge_alloc.h:206:31: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  206 |     assert(buffer.class_size_ = class_max_size(size_class));
      |            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Adding set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses") to CMakeLists.txt can also resolve/bypass the error and give me successful make but I believe it was an unintended typo.

For context, my local setup:

  • Operating system: 18.04.6 LTS (Bionic Beaver)
  • NIC model: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]
  • DPDK version: 19.11.5
  • rdma_core: compiled from source
  • g++ (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0

Thanks!

@anujkaliaiitd anujkaliaiitd self-assigned this May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants