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

relp: fix build against upcoming gcc-14 (`-Werror=calloc-transposed… #264

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

Conversation

kraj
Copy link

@kraj kraj commented May 7, 2024

…-args`)

gcc-14 added a new -Wcalloc-transposed-args warning recently. It
detected minor infelicity in calloc() API usage

Fixes
../../git/src/relp.c: In function 'addToEpollSet': ../../git/src/relp.c:101:39: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
101 | CHKmalloc(epd = calloc(sizeof(epolld_t), 1));
| ^~~~~~~~

…-args`)

`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
   detected minor infelicity in `calloc()` API usage

Fixes
../../git/src/relp.c: In function 'addToEpollSet':
../../git/src/relp.c:101:39: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  101 |         CHKmalloc(epd = calloc(sizeof(epolld_t), 1));
      |                                       ^~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
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

1 participant